Sunan an-Nasa'i, Volume 2, Book 13, Hadith 1224 (DarusSalam)

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