The Messenger of Allah ﷺ used to pray on his mount as he traveled from Mecca to Medina, in whatever direction it faced. Concerning this, the verse was revealed, "So wherever you turn, there is the face of Allah" [Baqarah 2:115].
حدثنا يحيى عن عبد الملك حدثنا سعيد بن جبير أن
كان رسول الله ﷺ يصلي على راحلته مقبلا من مكة إلى المدينة حيث توجهت به وفيه نزلت هذه الآية {فأينما تولوا فثم وجه الله}
Its isnad is sahih. Ibn Kathir cited it in his Tafsir, vol. 1, p. 289, from Tafsir Tabari, via Ibn Idris, from Abdul-Malik, that is Ibn Abu Sulayman, from Saeed bin Jubayr, with similar wording, and said, "Muslim, Tirmidhi, Nasai, Ibn Abu Hatim, and Ibn Mardawayh narrated it through several routes from Abdul-Malik bin Abu Sulayman, with the same content. Its basis is in the Sahihayn, from the hadith of Ibn Umar and Amir bin Rabia, without mention of the verse."He means the hadith of Ibn Umar mentioned previously, no. 4620. The hadith is in Sahih Muslim, vol. 1, p. 195, via Yahya bin Saeed, with the same isnad and wording as here.The narration of Tabari that Ibn Kathir mentioned reads as follows, from Ibn Umar, that he used to pray wherever his mount turned with him, and he mentioned that the Messenger of Allah ﷺ used to do that, and he would interpret this in light of the verse, "So wherever you turn, there is the face of Allah." [Baqarah 2:115]In my view, this wording is closer to being correct than the wording found in the Musnad and in Muslim, for this verse was not revealed concerning that particular matter, but rather carries a more general meaning, and it only serves here as supporting evidence and proof, as becomes clear from a proper understanding of its interpretation within its context.