A woman made a will that prayer and fasting be performed on her behalf.
As for a bequest to perform prayers or fasts on behalf of the deceased, such a bequest is not to be acted upon because both fasting and prayer are bodily acts of worship, and there is no deputization in them. However, if the deceased had vowed to fast, then it is to be fulfilled on her behalf because of the statement of the Prophet صلى الله عليه وسلم:
“Whoever dies and has a vow to fast, his guardian should fast on his behalf.”
[Sahih al-Bukhari, Hadith no. 1952; Sahih Muslim 1147/153]
Thus, a vowed fast should be observed on behalf of the deceased by her guardian, but for the regular obligatory prayers and fasts required by the Shari’ah, no deputization is allowed because these are bodily acts of worship that must be performed personally by the individual.
[Al-Fawzan: Al-Muntaqa: 105]