كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(19)
Chapter: As-Sahw (forgetfulness) in prayer and prostrating to compensate for it
(19)
باب السَّهْوِ فِي الصَّلاَةِ وَالسُّجُودِ لَهُ ‏
Sahih Muslim 570 a

'Abdullah b. Buhaina reported:

The Messenger of Allah (ﷺ) led us two rak'ahs of prayer in one of the (obligatory) prayers and then got up and did not sit. and the people stood up along with him. When he finished the prayer and we expected him to pronounce salutation. he said:" Allah is Most Great" while sitting and made two prostrations before salutation and then pronounced (the, final) salutation.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنِ ابْنِ شِهَابٍ، عَنْ عَبْدِ الرَّحْمَنِ الأَعْرَجِ، عَنْ عَبْدِ اللَّهِ ابْنِ بُحَيْنَةَ، قَالَ صَلَّى لَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم رَكْعَتَيْنِ مِنْ بَعْضِ الصَّلَوَاتِ ثُمَّ قَامَ فَلَمْ يَجْلِسْ فَقَامَ النَّاسُ مَعَهُ فَلَمَّا قَضَى صَلاَتَهُ وَنَظَرْنَا تَسْلِيمَهُ كَبَّرَ فَسَجَدَ سَجْدَتَيْنِ وَهُوَ جَالِسٌ قَبْلَ التَّسْلِيمِ ثُمَّ سَلَّمَ ‏.‏
Reference : Sahih Muslim 570a
In-book reference : Book 5, Hadith 107
USC-MSA web (English) reference : Book 4, Hadith 1163
  (deprecated numbering scheme)