وعن عبد الرحمن بن عوف رضي الله عنه قال : سجد النبي صلى الله عليه وآله وسلم فأطال السجود ثم رفع رأسه فقال : « إن جبريل أتاني فبشرني فسجدت لله شكرا ». رواه أحمد وصححه الحاكم.
Narrated 'Abdur-Rahman bin 'Auf (RA): The Prophet (ﷺ) prostrated and prolonged the Sajda, he then raised his head and said, "Jibrael (Gabriel) had come and given me glad tidings, thereafter I prostrated in gratitude to Allah." [Ahmad reported it and al-Hakim graded it Sahih (authentic)].
Explanation: The aforementioned narration is transmitted through multiple chains of transmission, and in one of these narrations, there is also this detail: the glad tidings and good news were that whoever sends blessings (salat) upon the Prophet sallallahu alayhi wa sallam once, Allah, the Exalted, will send ten mercies upon him, and ten of his sins will be forgiven. (Al-Musannaf of Ibn Abi Shaybah: 11/506) Upon receiving this pleasing news, the Prophet sallallahu alayhi wa sallam fell into prostration and expressed gratitude. Therefore, when someone attains a blessing or happiness, or is saved from a calamity, he should also perform the prostration of gratitude (sujud ash-shukr).