Question: A woman slept while her infant child was beside her. When she woke in the morning, she saw that her child had died, and he had not been ill beforehand. What is required of her? Bearing in mind that this woman is now elderly and too weak to fast – is it sufficient that her son fast on her behalf, or what should she do?
The answer – and Allah is the One who grants success – is that if this mother predominantly thinks that she is the one who killed her infant while asleep, then the diyah and fasting two months consecutively are obligatory upon her. If no such assumption arises in her mind, then nothing is required of her; the basic principle is freedom from liability.
Moreover, if she is unable to fast because of her old age, it is sufficient for her to feed sixty poor persons, giving each poor person half a ṣāʿ of wheat. It does not suffice that her son fast on her behalf. We have only said this by analogy with the fasting of the month of Ramaḍān.
If it is said: How can the woman know whether she should have such an assumption or not?
We say: That is known from circumstantial indicators. If the woman wakes from her sleep in her place and in the very posture she was in when she lay down, and her habit is that she does not toss and turn while sleeping, then with these indicators she will not assume that she was the cause of his death – and the opposite applies in the opposite case.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2