Hasan al-Basri (may Allah have mercy on him) said: The divorce of a madman is not valid until he regains his senses.