Abdullah bin Buhayna reported,

The Messenger of Allah ﷺ stood up during the noon prayer when he should have remained seated. When he completed his prayer, he performed two prostrations, saying the takbir for each prostration while seated, before making the closing salutation. The people prostrated along with him to make up for the sitting he had forgotten.Ibn Jurayj followed him in this narration from Ibn Shihab regarding the takbir.

Bukhari 1230

Sahih

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

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

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

البخاري 1230صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Forgetfulness
Chapter
Whoever says takbir in the two prostrations of forgetfulness
Numbering
Darussalam 1230
Bukhari 1230