Abdullah bin Buhayna reported,

The Messenger of Allah ﷺ stood up during the Dhuhr prayer at a point where he should have remained sitting. When he had completed the prayer, he performed two prostrations, saying the takbir at each prostration while seated, before giving the salam, and the people prostrated along with him, making up for the sitting he had forgotten.

Muslim 1270

Sahih

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

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

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

مسلم 1270صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Forgetfulness in prayer and sujud for it
Numbering
Darussalam 1270
Muslim 1270