Aishah (may Allah be pleased with her) said that the Prophet (peace and blessings be upon him) said: "The pen has been lifted from three: from the child until he reaches puberty, from the insane until he recovers, and from the one sleeping until he wakes up."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنايات / 15978
Marwan bin al-Hakam wrote to Sayyiduna Mu'awiyah (may Allah be pleased with him) that a madman had committed a killing, (asking) what he should do. He wrote in reply: Do not kill him; take the blood money, for there is no retaliation upon a madman.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنايات / 15979
Yahya bin Sa'id (may Allah have mercy on him) said that Marwan bin al-Hakam (may Allah have mercy on him) wrote to Sayyiduna Mu'awiyah (may Allah be pleased with him) that a man had committed a killing while intoxicated, and he replied: Kill him too in retaliation.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنايات / 15980