Sayyiduna Ibn Umar (may Allah be pleased with them both) narrates that this verse was revealed « فَأَيْنَمَاتُوَلُّوافَثَمَّوَجْهُاللَّهِ »[ سورة البقرة : 115 ] "So wherever you turn, there is the Face of Allah." That you may perform prayer while traveling, and your mount may turn you in whichever direction it wishes. (Therefore) when the Messenger of Allah (peace and blessings be upon him) returned from Makkah Mukarramah to Madinah Munawwarah, he was performing voluntary prayers on his mount, indicating with his head.
Hadith Referenceصحيح ابن خزيمه / جماع أبواب صلاة التطوع فى السفر على الدواب / 1269