The Messenger of Allah ﷺ said, "The pen has been lifted from three: from the sleeper until he wakes, from the afflicted until he recovers, and from the child until he reaches the age of understanding."
حدثنا يزيد أخبرنا حماد بن سلمة عن حماد عن إبراهيم عن الأسود
أن رسول الله ﷺ قال رفع القلم عن ثلاثة عن النائم حتى يستيقظ وعن المبتلى حتى يبرأ وعن الصبي حتى يعقل