Abdullah bin Umar reported,

The Messenger of Allah ﷺ would pray on his mount as he traveled from Makkah to Madinah, facing whatever direction it was headed. He said, and it was concerning this that the verse was revealed, "So wherever you turn, there is the face of Allah" [Baqarah 2:115].

Azami 2898

Sahih

عن ابن عمر قال

كان رسول الله ﷺ يصلي وهو مقبل من مكة إلى المدينة على راحلته حيث كان وجهه، قال: وفيه نزلت {فأينما تولوا فثم وجه الله} [سورة البقرة: ١١٥].

الأعظمي 2898صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Witr prayer
Section
Obligatory prayer is not performed on a mount, unlike voluntary prayer
Numbering
Jami al-Kamil 2898 (2nd edition)
Azami 2898