Translation
(18) Shortening the Prayers (At-Taqseer)
كتاب التقصير
(7) Chapter: To offer Nawafil on the back of animals
(7) باب صَلاَةِ التَّطَوُّعِ عَلَى الدَّوَابِّ وَحَيْثُمَا تَوَجَّهَتْ بِهِ
Sahih al-Bukhari 1094 

Narrated Jabir bin `Abdullah:

The Prophet (ﷺ) used to offer the Nawafil, while riding, facing a direction other than that of the Qibla.

حَدَّثَنَا أَبُو نُعَيْمٍ، قَالَ حَدَّثَنَا شَيْبَانُ، عَنْ يَحْيَى، عَنْ مُحَمَّدِ بْنِ عَبْدِ الرَّحْمَنِ، أَنَّ جَابِرَ بْنَ عَبْدِ اللَّهِ، أَخْبَرَهُ أَنَّ النَّبِيَّ صلى الله عليه وسلم كَانَ يُصَلِّي التَّطَوُّعَ وَهْوَ رَاكِبٌ فِي غَيْرِ الْقِبْلَةِ‏.‏
Reference : Sahih al-Bukhari 1094
In-book reference : Book 18, Hadith 14
USC-MSA web (English) reference : Vol. 2, Book 20, Hadith 199
  (deprecated numbering scheme)