It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) led a prayer and there was some addition or omission in it. When he (peace and blessings be upon him) finished the prayer, the Companions (may Allah be pleased with them) said: O Messenger of Allah! Has some new ruling been revealed concerning the prayer? He (peace and blessings be upon him) asked: "What is it?" Abdullah bin Mas'ud (may Allah be pleased with him) said: We reminded him of what had happened in the prayer, so he (peace and blessings be upon him) folded his leg, faced the qiblah and performed two prostrations. Then he turned toward us and said: "If a new ruling had come regarding the prayer, I would certainly have told you. I am only a human being; I forget just as you forget. So when I forget, remind me. And whoever of you forgets something in his prayer, let him think it over, then complete his prayer according to what he considers correct, and then perform the two prostrations of forgetfulness (sahw)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2256
It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that once the Messenger of Allah (peace and blessings be upon him) forgot something in the prayer, so he performed the two prostrations of forgetfulness (sahw).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2257