Sunan an-Nasa'i, Book 13, Hadith 45 (In-Book)

It was narrated from 'Abdullah bin Buhainah that: The Messenger of Allah stood up during the prayer when he should have sat, so he prostrated twice while sitting, before the taslim.

أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ هُرْمُزَ، عَنْ عَبْدِ اللَّهِ ابْنِ بُحَيْنَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَامَ فِي الصَّلاَةِ وَعَلَيْهِ جُلُوسٌ فَسَجَدَ سَجْدَتَيْنِ وَهُوَ جَالِسٌ قَبْلَ التَّسْلِيمِ ‏.‏

sunnah.com