Ibn Umar used to pray on his mount during travel, facing whatever direction it took him. Ibn Umar mentioned that the Messenger of Allah ﷺ used to do the same while traveling.
حدثنا عفان حدثنا عبد العزيز بن مسلم
أن ابن عمر كان يصلي على راحلته في السفر أينما توجهت به قال وذكر ابن عمر أن رسول الله ﷺ كان يفعل ذلك في السفر