It is reported from the Messenger of Allah ﷺ that he stood up during the prayer when he should have remained sitting, so he performed two prostrations while sitting before the final salutation.
أخبرنا قتيبة قال حدثنا الليث عن يحيى بن سعيد عن عبد الرحمن بن هرمز
عن رسول الله ﷺ أنه قام في الصلاة وعليه جلوس فسجد سجدتين وهو جالس قبل التسليم