Maliks Muwatta Book 37, Hadith Number 3.

Section : Permissibility of the Bequest of the Child, the Simpleton, the Lunatic and the Idiot.

Malik related to me from Yahya ibn Said from Abu Bakr ibn Hazm that a boy from Ghassan was dying in Madina while his heir was in Syria. That was mentioned to Umar ibn al-Khattab. It was said to him, “So-and-so is dying. Shall he make a bequest?” He said, “Let him make a bequest.”

Yahya ibn Said said that Abu Bakr had said, “He was a boy of ten or twelve years.” Yahya said, “He willed the well of Jusham, and his people sold it for 30,000 dirhams.”

Yahya said that he heard Malik say, “The generally agreed-on way of doing things in our community is that a simpleton, an idiot, or a lunatic who recovers at times, can make wills if they have enough of their wits about them to recognise what they will. Someone who has not enough wits to recognise what he wills, and is overcome in his intellect, cannot make a bequest.”