Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
Answering your question, The Fatwa Center at Islamweb, states:
There is no doubt that the deceased will benefit from the righteousness of his children after his death even if he did not have a direct role in their upbringing, because he will benefit from their supplications.
Besides, his choice of their righteous mother is considered an important role in raising them upon righteousness.
The deceased benefits from the continuous charity (charity which has a continuous benefit) whether it was donated for him, his children, his wife, or by any other strange person (a non-relative)
The Shari`ah stipulated that the deceased benefits from the continuous charity, and it did not restrict it to be from one of his relatives.
Abu Hurairah (may Allah be pleased with him) narrated that the Prophet (peace be upon him) said: “When a person dies, his deeds come to an end, except for three: a continuous charity, or knowledge that benefits people, or a pious child who supplicates for him.” (Muslim)
The best charity for the deceased is the continuous charity, such as digging a well, and the like, in places where the people need water.
Sa`d ibn Ubadah (may Allah be pleased with him) narrated: “I said: ‘O Messenger of Allah, my mother has died; can I give charity on her behalf?’ He (peace be upon him) said: ‘Yes.’ Sa`d asked: ‘What kind of charity is best?’ The Prophet (peace be upon him) replied: ‘Providing drinking water’.” (Ahmad)
Additionally, constructing mosques, Quran Memorization Centers, schools and hospitals, are all considered continuous charities.
The Prophet (peace be upon him) said: “Whoever builds a mosque in which the Name of Allah will be mentioned, Allah will build for him a house in Paradise.” (Ahmad)
Also, the reward for spending charity on a needy family on behalf of the deceased will reach him. This is one of the best acts of charity and it is one of the greatest in reward.
“Indeed, the men who practice charity and the women who practice charity and [they who] have loaned Allah a goodly loan – it will be multiplied for them, and they will have a noble reward.” (Al-Hadid 57:18)
So, dear sister, endeavor to raise your children on piety and righteousness, and both you and your husband will benefit from them in this worldly life and in the Hereafter. Give charity on behalf of your husband and he will get its reward.
Finally, it should be noted that it is not permissible to give charity from the children’s money, who are still young and below the age of puberty, and it is not permissible to dispose of their wealth except in what is in the best of their interest.
The one who looks after the money of minors and disposes of it after the death of their father, is their grandfather or great-grandfather from their father’s side.
If the children do not have a grandfather or great-grandfather from their father’s side, then it is whoever the father of the children had appointed (in his will) to dispose of their wealth after his death.
If there is none, then it is the (Muslim) judge, for the hadith that reads: “The judge is the wali (guardian) of whoever does not have a guardian.” (At-Tirmithi)
The departments and institutions set up by the government to take care of minors also act instead of the judge.
If there is no judge, then the guardianship transfers to the righteousness people among the Muslims. In the West, one should resort to reliable Islamic Centers run by the scholars.
Almighty Allah knows best.