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.
tirmidhi:1578Muḥammad b. al-Muthanná > Abū ʿĀṣim > Bakkār b. ʿAbd al-ʿAzīz b. Abū Bakrah from his father > Abū Bakrah

"The Prophet ﷺ was met by some affair that made him happy, so he prostrated to Allah."  

[Abu 'Eisa said:] This Hadith is Hasan Gharib, we do not know of it except from this route, as a narration of Bakkar bin 'Abdul-'Aziz. This is acted upon according to most of the people of knowledge, they held the view that one could perform the prostration of gratitude. And Bakkar bin 'Adbul-'Aziz bin Abi Bakrah is Muqarib (average) in Hadith.
الترمذي:١٥٧٨حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى حَدَّثَنَا أَبُو عَاصِمٍ حَدَّثَنَا بَكَّارُ بْنُ عَبْدِ الْعَزِيزِ بْنِ أَبِي بَكْرَةَ عَنْ أَبِيهِ عَنْ أَبِي بَكْرَةَ

أَنَّ النَّبِيَّ ﷺ أَتَاهُ أَمْرٌ فَسُرَّ بِهِ فَخَرَّ لِلَّهِ سَاجِدًا  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ لاَ نَعْرِفُهُ إِلاَّ مِنْ هَذَا الْوَجْهِ مِنْ حَدِيثِ بَكَّارِ بْنِ عَبْدِ الْعَزِيزِ وَالْعَمَلُ عَلَى هَذَا عِنْدَ أَكْثَرِ أَهْلِ الْعِلْمِ رَأَوْا سَجْدَةَ الشُّكْرِ وَبَكَّارُ بْنُ عَبْدِ الْعَزِيزِ بْنِ أَبِي بَكْرَةَ مُقَارِبُ الْحَدِيثِ