Hadith 10

Sahih Bukhari

Book 22: Forgetfulness in Prayer

Chapter 7

Sahw in compulsory Salat and Nawafil

باب السَّهْوِ فِي الْفَرْضِ وَالتَّطَوُّعِ

Ibn ‘Abbas رضي الله عنهما performed two prostrations (of Sahw) after the Witr prayer. ​​
وَسَجَدَ ابْنُ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا سَجْدَتَيْنِ بَعْدَ وِتْرِهِ.
Sahih al-Bukhari 1232
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، أَخْبَرَنَا مَالِكٌ، عَنِ ابْنِ شِهَابٍ، عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ ‏‏.‏
"‏ إِنَّ أَحَدَكُمْ إِذَا قَامَ يُصَلِّي جَاءَ الشَّيْطَانُ فَلَبَسَ عَلَيْهِ حَتَّى لاَ يَدْرِيَ كَمْ صَلَّى، فَإِذَا وَجَدَ ذَلِكَ أَحَدُكُمْ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ ‏"
Abu Huraira:

Allah's Messenger (ﷺ) said, "When anyone of you stands for the prayers, Satan comes and puts him in doubts till he forgets how many rak`at he has prayed. So if this happens to anyone of you, he should perform two prostrations of Sahu while sitting.