which is authentic and narrated by Abū Mūsā, the Prophet, may Allah bless him and grant him peace, said:
“When a servant falls ill or travels, he is credited with the deeds he used to perform while healthy and resident.”
It is also authentically reported that during the expedition to Tabūk, the Prophet, may Allah bless him and grant him peace, said:
“There are men in Medina who have been with you on every journey you have made and in every valley you have crossed.” They asked, “Even though they are in Medina?” He replied, “Even though they are in Medina. A valid excuse has kept them back.”
These people intended and wished to continue the deeds they used to perform, but were unable to do so. They therefore attained the same standing as those who performed them. This differs from someone who has lost his reason, for he has neither a sound intention nor any worship at all, whereas those people have a sound intention for which reward is recorded.
If, however, before becoming insane, he was a disbeliever, openly disobedient, or sinful, the onset of insanity does not erase his previously established disbelief and disobedience. Thus, Jews and Christians who become insane after embracing Judaism or Christianity will be gathered with their respective communities. Likewise, Muslims who become insane after having faith and piety will be gathered with the pious believers.
Losing one’s reason through insanity or otherwise—whether the person is described as overwhelmed or bewildered—does not increase one’s faith or piety. Nor does the loss of reason cause any increase in one’s goodness, righteousness, or sin. Rather, insanity deprives a person of reason, leaving him with whatever good and evil he already possessed, neither increasing nor diminishing it. His insanity, however, deprives him of further good, just as it prevents him from being punished for evil.