Not offering Some of the Prayers, due to losing One's Mind
Question :
A man died while owing some obligatory prayers which he had not offered while he was ill and out of his mind; is it an obligation upon his living relatives, men or women, to make up these prayers, or will the deceased not be held accountable for them due to him losing his mind, and is it not an obligation upon his heirs to make up for these obligatory prayers?
Answer:
If a person does not offer the obligatory prayers due to insanity and he has no physical illness, there is no sin upon him as he will not be held accountable for them due to him losing his mind. There is no necessity for his heirs to make up for them. And if he abandoned his prayer while he was rational, whether or not his body was afflicted with disease then he is a wicked sinner due to his abandoning prayer, and his affair will be left to his Lord and his prayer does not need to be made up.
Source:
The Permanent Committee
Fatawa Islamiyah, Vol. 2 Pages 375-376