Abiya Yusuf reported,

Muawiya led them in prayer. He stood up at a point in the prayer where he should have remained sitting. The people said "Subhan Allah" to alert him, but he continued standing. Then, after completing the prayer, he performed two prostrations while seated. Afterward, he sat on the pulpit and said, "I heard the Messenger of Allah ﷺ say, 'Whoever forgets something in his prayer should perform two prostrations like these.'"

Nasai 1261

Hasan

أخبرنا الربيع بن سليمان قال حدثنا شعيب بن الليث قال حدثنا الليث عن محمد بن عجلان عن محمد بن يوسف مولى عثمان

عن أبيه يوسف

أن معاوية صلى أمامهم فقام في الصلاة وعليه جلوس فسبح الناس فتم على قيامه ثم سجد سجدتين وهو جالس بعد أن أتم الصلاة ثم قعد على المنبر فقال إني سمعت رسول الله ﷺ يقول من نسي شيئا من صلاته فليسجد مثل هاتين السجدتين

النسائي 1261حسن
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Forgetfulness
Chapter
What to do if one forgets something in the prayer
Numbering
Darussalam 1261
Nasai 1261