The stone of madness, also called stone of folly, was a hypothetical stone in a patient's head, thought to be the cause of madness, idiocy or dementia.
From the 15th century onwards, removing the stone by trepanation was proposed as a remedy.
[1][2] This procedure is demonstrated in the painting The Extraction of the Stone of Madness by Hieronymus Bosch.
[3]