It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both): "The Messenger of Allah (peace and blessings be upon him) would pray (voluntary prayer) on his mount, not minding which direction he was facing."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13073