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