It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) was coming from Makkah towards Madinah seated on his mount and offering (voluntary) prayer; whichever way he faced, he kept on praying. Sayyiduna Ibn Umar (may Allah be pleased with them both) says that this noble verse was revealed concerning this very matter: "So wherever you turn, there is the Face of Allah." [Surah al-Baqarah: 115]
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2202