Hadith 1207

It was narrated from ‘Abdur-Rahman Al-A’raj that Ibn Buhainah told him that the Prophet (saw) stood up in the second Rak’ah of Zuhr and forgot to sit. When he had finished his prayer, and before he said the Salam, he performed the two prostrations for forgetfulness (Sahw) and said the Salam.

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا ابْنُ نُمَيْرٍ، وَابْنُ، فُضَيْلٍ وَيَزِيدُ بْنُ هَارُونَ ح وَحَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو خَالِدٍ الأَحْمَرُ، وَيَزِيدُ بْنُ هَارُونَ، وَأَبُو مُعَاوِيَةَ كُلُّهُمْ عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ عَبْدِ الرَّحْمَنِ الأَعْرَجِ، أَنَّ ابْنَ بُحَيْنَةَ، أَخْبَرَهُ أَنَّ النَّبِيَّ ـ صلى الله عليه وسلم ـ قَامَ فِي ثِنْتَيْنِ مِنَ الظُّهْرِ نَسِيَ الْجُلُوسَ حَتَّى إِذَا فَرَغَ مِنْ صَلاَتِهِ إِلاَّ أَنْ يُسَلِّمَ سَجَدَ سَجْدَتَىِ السَّهْوِ وَسَلَّمَ ‏.‏

Reference: 1312630
In-book reference: Book 5, Hadith 1207
Hadith 1207 - The Book On The Mosques And The Congregations - Sunan Ibn Majah - Sunnah.com