Chapter on the Prostration of Forgetfulness
Since man is liable to lapse into forgetfulness and distraction, and since Satan eagerly tries to disturb his prayer by stirring up thoughts and diverting his mind from the act of worship, an unintentional omission or addition may occur in the prayer. Therefore Allah has prescribed that the worshipper perform two prostrations at the end of his prayer—so as to avert such error, humble Satan, compensate for any deficiency, and please the Most Merciful. The scholars have named this act the prostration of forgetfulness.
Sahw (forgetfulness) is a lapse of memory. The Prophet himself experienced sahw during prayer, and that lapse was in fact a manifestation of Allah’s perfect favor upon his community and the completion of their religion, so that they might emulate him in what he legislated for them when they err. Several incidents of his sahw in prayer have been authentically preserved: he concluded the prayer after two rakʿahs (units of prayer) and then prostrated; he concluded it after three rakʿahs and then prostrated; he stood for a third rakʿah without sitting for the tashahhud (testification of faith) and then prostrated—and other cases besides. He said, “If any one of you forgets, let him prostrate twice.”