It is narrated from Sayyidah Aishah (may Allah be pleased with her) that he (peace and blessings be upon him) said: "The pen is lifted from three: from the child until he reaches puberty, from the insane until he recovers, and from the sleeper until he wakes up."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الإقرار / 11453
It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Mistakes, forgetfulness and what they are coerced into have been pardoned for my Ummah."
The preserved (mahfuz) version from al-Walid bin Muslim is: from al-Awza'i, from Ata, from Ibn Abbas; and from al-Walid, from Ibn Lahi'ah, from Musa bin Wardan, from Uqbah bin Amir, both of them from the Prophet (peace and blessings be upon him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الإقرار / 11454