Sayyiduna Abdullah bin Buhaynah al-Asadi (may Allah be pleased with him), who was an ally of Banu Abd al-Muttalib, says that the Messenger of Allah (peace and blessings be upon him) was supposed to sit in the Zuhr prayer but stood up out of forgetfulness. When he (peace and blessings be upon him) completed the prayer, he (peace and blessings be upon him) performed two prostrations while sitting, before the salam, saying the takbir in each prostration, and the rest of the people also performed those two prostrations with him (peace and blessings be upon him). These were in place of the sitting (qa'dah) that he (peace and blessings be upon him) had forgotten.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3890
Abdullah bin Buhaynah (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) forgot the sitting (qa'dah) in the prayer and stood up. We began waiting for the Messenger of Allah (peace and blessings be upon him) to give the salam. He prostrated, then raised his head saying the takbir, then said the takbir and performed the second prostration, then raised his head from the second prostration saying the takbir, then gave the salam.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3891