The Messenger of Allah ﷺ used to pray on his mount in whatever direction it faced.
حدثنا عبد الأعلى عن معمر عن الزهري عن سالم
أن رسول الله ﷺ كان يصلي على راحلته حيث توجهت به
Its isnad is sahih, and it is a repetition of 4470 with the same meaning. See also 4476.