عَنْ عَلِيٍّ رَضِيَ اللَّهُ عَنْهُ قَالَ: سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يَقُولُ: ((رُفِعَ الْقَلَمُ عَنْ ثَلَاثَةٍ، عَنِ الصَّغِيرِ حَتَّى يَبْلُغَ وَعَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ وَعَنِ الْمُصَابِ حَتَّى يُكْشَفَ عَنْهُ))
It is narrated from Sayyiduna Ali (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him and his family) said: The pen has been lifted from three individuals: from the child until he reaches puberty, from the sleeping person until he wakes up, and from the insane person until his condition passes.