The decision of Hazrat Umar (RA) regarding the insane person is that a time should be fixed for his treatment. If he does not recover within this time, his wife must be separated from him. The jurists have also expressed this view and have maintained this instruction in various contexts.
According to Imam Abu Haneefah (R) this rule will only apply to a person who was insane before marriage and was not able to have sexual intercourse after marriage. Thinking from this point of view, it seems that he is also impotent and for this he is being given one year leave.
According to Imam Muhammad (pbuh), if insanity occurs occasionally, he will be given one year for treatment. And if it is permanent, then it will fall under the command of the person who has undergone gender reassignment and the marriage will have to be dissolved without any time-opportunity.
According to Imam Malik (RA), in case of both permanent insanity and temporary insanity, one year should be given for treatment. If he does not recover during this time, the marriage will be dissolved. But the jurists of the Maliki school have included the following conditions.
If the marriage has already taken place and the woman has voluntarily and consensually married to him, then he cannot demand divorce.
If after marriage she finds out that her husband is insane and has publicly declared his consent to live with her, she will not have the right to divorce.
If insanity occurs after marriage, the wife can file for divorce only if she does not express her consent to live with him after her husband's insanity and does not allow her to have sexual intercourse of her own free will and consent.

