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.
حدثنا قتيبة بن سعيد حدثنا ليث عن ابن شهاب عن الأعرج
أن رسول الله ﷺ قام في صلاة الظهر وعليه جلوس فلما أتم صلاته سجد سجدتين فكبر في كل سجدة وهو جالس قبل أن يسلم وسجدهما الناس معه مكان ما نسي من الجلوس تابعه ابن جريج عن ابن شهاب في التكبير