Ali ibn Abi Talib reported: The Messenger of Allah, peace and blessings be upon him, said, “The pen is lifted from three people: a sleeping person until he awakens, a child until he becomes an adult, and an insane person until he regains his sanity.”
Source: Sunan al-Tirmidhī 1423
Grade: Sahih (authentic) according to Al-Albani
عَنْ عَلِيٍّ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ رُفِعَ الْقَلَمُ عَنْ ثَلَاثَةٍ عَنْ النَّائِمِ حَتَّى يَسْتَيْقِظَ وَعَنْ الصَّبِيِّ حَتَّى يَشِبَّ وَعَنْ الْمَعْتُوهِ حَتَّى يَعْقِلَ
1423 سنن الترمذي كتاب الحدود باب ما جاء فيمن لا يجب عليه الحد
1423 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الترمذي