Sunan Abu Dawud #4398
Prescribed Punishments (Kitab Al-Hudud) 40:48
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.