Sunan an-Nasa'i, Book 27, Hadith 44 (Nasa'i 3438)

It was narrated from 'Aishah that the Prophet said:

"The pen has been lifted from three: From the sleeper until he wakes up, from the minor until he grows up, and from the insane until he comes back to his senses or recovers."