The Messenger of Allah ﷺ used to pray on his mount in whatever direction it faced.
حدثنا عفان حدثنا وهيب حدثنا عبيد الله عن نافع
أن رسول الله ﷺ كان يصلي على راحلته حيث توجهت به
Its isnad is sahih. It is a shortened version of 5413.