´It was narrated that ‘Abdullah said:` “The Messenger of Allah (ﷺ) prayed, and he added or omitted something.” (One of the narrators) Ibrahim said: “The confusion stems from me (i.e., he was not sure which it was).” “It was said to him: ‘O Messenger of Allah! Has something been added to the prayer?’ He said: ‘I am only human, I forget just as you forget. If anyone forgets, let him perform two prostrations when he is sitting (at the end).’ Then the Prophet (ﷺ) turned and prostrated twice.”
Hadith Referenceسنن ابن ماجه / كتاب إقامة الصلاة والسنة / 1203
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:صحيح مسلم
´‘Iyad narrated that he asked Abu Sa’eed Al-Khudri:` “One of us prays and he does not know how many (Rak’ah) he has prayed.” He said: “The Messenger of Allah (ﷺ) said: ‘When anyone of you prays and does not know how many he has prayed, let him perform two prostrations while he is sitting.’”
Hadith Referenceسنن ابن ماجه / كتاب إقامة الصلاة والسنة / 1204
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:إسناده حسن