Bulugh al-Maram 1096
وَعَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا, عَنْ النَّبِيِّ - صلى الله عليه وسلم - قَالَ: «رُفِعَ الْقَلَمُ عَنْ ثَلَاثَةٍ: عَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ, وَعَنِ الصَّغِيرِ حَتَّى يَكْبُرَ, وَعَنِ الْمَجْنُونِ حَتَّى يَعْقِلَ, أَوْ يَفِيقَ». رَوَاهُ أَحْمَدُ, وَالْأَرْبَعَةُ إِلَّا التِّرْمِذِيَّ وَصَحَّحَهُ الْحَاكِمُ.
From ʿAʾishah, may Allah be pleased with her, from the Prophet ﷺ, who said: "The pen has been lifted from three: from the sleeper until he wakes up, from the young until he grows up, and from the insane until he regains his reason, or recovers." Ahmad and the Four except at-Tirmidhi reported it, and al-Hakim declared it sahih.