Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:12277ʿAbd al-Ṣamad b. ʿAbd al-Wārith > Bakkār b. Māhān > Anas b. Sīrīn > Anas b. Mālik

[Machine] The Messenger of Allah ﷺ used to voluntarily offer prayers on his camel during travel in a direction other than the Qibla.  

أحمد:١٢٢٧٧حَدَّثَنَا عَبْدُ الصَّمَدِ بْنُ عَبْدِ الْوَارِثِ حَدَّثَنَا بَكَّارُ بْنُ مَاهَانَ حَدَّثَنَا أَنَسُ بْنُ سِيرِينَ عَنْ أَنَسِ بْنِ مَالِكٍ

أَنَّ رَسُولَ اللهِ ﷺ كَانَ يُصَلِّي عَلَى نَاقَتِهِ تَطَوُّعًا فِي السَّفَرِ لِغَيْرِ الْقِبْلَةِ