Abdullah bin Buhayna reported,

The ally of the clan of Abdul-Muttalib reported that the Prophet ﷺ stood up during the noon prayer when he should have remained seated. After completing his prayer, he performed two prostrations, saying takbir for each one while seated, before giving the salam. The people prostrated along with him, making up for the sitting he had forgotten.

Tirmidhi 391

Sahih

حدثنا قتيبة حدثنا الليث عن ابن شهاب عن الأعرج

عن عبد الله ابن بحينة الأسدي

حليف بني عبد المطلب أن النبي ﷺ قام في صلاة الظهر وعليه جلوس فلما أتم صلاته سجد سجدتين يكبر في كل سجدة وهو جالس قبل أن يسلم وسجدهما الناس معه مكان ما نسي من الجلوس

الترمذي 391صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
Prostrations of forgetfulness before the taslim
Numbering
Darussalam 391
Tirmidhi 391