Salim reported,

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."

Bukhari 1098

Sahih

وقال الليث حدثني يونس عن ابن شهاب قال

قال سالم

كان عبد الله بن عمر رضي الله عنهما يصلي على دابته من الليل وهو مسافر ما يبالي حيث ما كان وجهه قال ابن عمر وكان رسول الله ﷺ يسبح على الراحلة قبل أي وجه توجه ويوتر عليها غير أنه لا يصلي عليها المكتوبة

البخاري 1098صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Shortening
Chapter
Coming down for the obligatory prayer
Numbering
Darussalam 1098
Bukhari 1098