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.'"
أخبرنا الربيع بن سليمان قال حدثنا شعيب بن الليث قال حدثنا الليث عن محمد بن عجلان عن محمد بن يوسف مولى عثمان
أن معاوية صلى أمامهم فقام في الصلاة وعليه جلوس فسبح الناس فتم على قيامه ثم سجد سجدتين وهو جالس بعد أن أتم الصلاة ثم قعد على المنبر فقال إني سمعت رسول الله ﷺ يقول من نسي شيئا من صلاته فليسجد مثل هاتين السجدتين
[Its chain of transmission is hasan] Ahmad narrated it, 4/100, from the hadith of Layth bin Saad, transmitted through him, and it is also in al-Kubra, hadith no. 594 and 1183.Muhammad bin Yusuf is trustworthy, and his father's hadith is hasan. Ibn Ajlan explicitly stated that he heard it directly, as recorded by Ahmad, 4/100, and by Tabarani in al-Kabir, 19/336, 337, and Ibn Jurayj corroborated him.