Sahih al-Bukhari 1097
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَامِرِ بْنِ رَبِيعَةَ، أَنَّ عَامِرَ بْنَ رَبِيعَةَ، أَخْبَرَهُ قَالَ رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم وَهْوَ عَلَى الرَّاحِلَةِ يُسَبِّحُ، يُومِئُ بِرَأْسِهِ قِبَلَ أَىِّ وَجْهٍ تَوَجَّهَ، وَلَمْ يَكُنْ رَسُولُ اللَّهِ صلى الله عليه وسلم يَصْنَعُ ذَلِكَ فِي الصَّلاَةِ الْمَكْتُوبَةِ.
Narrated 'Amir bin Rabi`a:
I saw the Prophet (ﷺ) on his Mount praying Nawafil by nodding his head, whatever direction he faced, but Allah's Messenger (ﷺ) never did the same in offering the compulsory prayers.
Full reference and source
Sahih al-Bukhari 1097 In-book : Book 18, Hadith 17 USC-MSA web (English) : Vol. 2, Book 20, Hadith 202 (deprecated)
View source on Sunnah.com (opens in a new tab)