عَنْ عَائِشَةَ رضي الله عنها عَنِ النَّبِيِّ صلى الله عليه وآله وسلم قَالَ: ((رُفِعَ الْقَلَمُ عَنْ ثَلَاثَةٍ، عَنِ الصَّبِيِّ حَتَّى يَحْتَلِمَ وَعَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ، وَعَنِ الْمَعْتُوهِ حَتَّى يَعْقِلَ))۔
It is narrated from Sayyida Aisha (may Allah be pleased with her) that the Noble Prophet (peace and blessings be upon him) said: Three types of people are exempt from accountability (i.e., free from punishment for sins): first, a minor child until he reaches maturity; second, a sleeping person until he wakes up; and third, an insane person until his mental balance is restored.