It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When any one of you stands to pray, Satan comes to him and confuses him (about the prayer), until he does not know how much he has prayed. So when any one of you experiences this, let him perform two prostrations while sitting."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3889