Hadith 1038

Ibn ‘Abbas said that the Prophet prostrated himself when reciting Sad (Al-Qur’an; 38) and said, "David made this prostration in repentance, but we do it out of gratitude.” Nasa’i transmitted it.

وَعَنِ ابْنِ عَبَّاسٍ قَالَ: إِنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ سَجَدَ فِي (ص) وَقَالَ: سَجَدَهَا دَاوُدُ تَوْبَةً وَنَسْجُدُهَا شُكْرًا. رَوَاهُ النَّسَائِيُّ

Reference: 5610380
In-book reference: Book 4, Hadith 1038