ENOfficial
Narrated Aisha, Ummul Mu'minin: The Messenger of Allah (ﷺ) said: There are three (persons) whose actions are not recorded: a sleeper till he awakes, an idiot till he is restored to reason, and a boy till he reaches puberty.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا يَزِيدُ بْنُ هَارُونَ، أَخْبَرَنَا حَمَّادُ بْنُ سَلَمَةَ، عَنْ حَمَّادٍ، عَنْ إِبْرَاهِيمَ، عَنِ الأَسْوَدِ، عَنْ عَائِشَةَ، رضى الله عنها أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " رُفِعَ الْقَلَمُ عَنْ ثَلاَثَةٍ عَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ وَعَنِ الْمُبْتَلَى حَتَّى يَبْرَأَ وَعَنِ الصَّبِيِّ حَتَّى يَكْبَرَ " .
sunnah.com