Sayyiduna Abdullah (bin Mas'ud) (may Allah be pleased with him) said: We prayed with the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) either added (to the rak'ahs) or fell short - Ibrahim (the narrator) said: By Allah, this (doubt) is from me alone - so we said: O Messenger of Allah, has something new occurred in the prayer? He (peace and blessings be upon him) said: "No." We told him (peace and blessings be upon him) what he had done. He (peace and blessings be upon him) said: "When a man adds or falls short (in the prayer), let him perform two prostrations." The narrator said: Then he (peace and blessings be upon him) performed two prostrations.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9796