Abdullah bin Umar used to pray on his mount during the night while traveling, paying no attention to whichever direction he was facing.Ibn Umar said, "The Messenger of Allah ﷺ used to perform voluntary prayers on his riding camel in whatever direction it was heading, and he would also pray Witr on it, but he would not pray the obligatory prayers on it."
وقال الليث حدثني يونس عن ابن شهاب قال
كان عبد الله بن عمر رضي الله عنهما يصلي على دابته من الليل وهو مسافر ما يبالي حيث ما كان وجهه قال ابن عمر وكان رسول الله ﷺ يسبح على الراحلة قبل أي وجه توجه ويوتر عليها غير أنه لا يصلي عليها المكتوبة