It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) prayed the Zuhr or Asr prayer with five rak'ahs, then performed the two prostrations of forgetfulness. Then the Messenger of Allah (peace and blessings be upon him) said: "These two prostrations are for whoever thinks that he has added or left something out."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9812