Likewise, any bequest that someone should perform prayers or fast on her behalf is not to be executed, because prayer and fasting are purely physical acts that do not admit of proxy performance.
However, if she had a fast that she had vowed (nadhr), then it may be observed on her behalf, in light of the Prophet’s ﷺ statement: “Whoever dies while owing a fast, his walī (guardian or heir) should fast on his behalf.”
In Ṣaḥīḥ Muslim it is related from Ibn ʿAbbās (may Allah be pleased with them both) that “a woman came to the Messenger of Allah ﷺ and said, ‘O Messenger of Allah, my mother has died and she owed a vowed fast. May I fast on her behalf?’ He replied, ‘Tell me: if your mother had a debt and you settled it for her, would that discharge her obligation?’ She said, ‘Yes.’ He said, ‘Then fast on behalf of your mother.’”
Thus, a vowed fast owed by the deceased may be fulfilled by his walī. As for the obligatory prayers and fasts that are incumbent by the original prescription of the Sharīʿah, these cannot be undertaken by proxy, for they are bodily acts.
Question: Who should undertake the payment of the remaining debt?
Answer: Matters pertaining to the bequest and the settlement of the debt should be referred to the judge. He will enumerate and verify the debts, determine which parts of the bequest are valid and which are not, and appoint someone to carry out and execute what needs to be done.