Any good deed that a Muslim starts during his lifetime, and that is of renewed benefit and ongoing use for the Muslims, will continue to benefit him and augment his record of good deeds, even after his departure - as long as its benefits continue to reach others. Allaah subhanahu wa ta’ala says - “We record that (deeds) which they have put forward and their traces (that which they have left behind).” (Yaa-Seen 36:12)
Abu Hurayrah rahimahullaah reported that Allaah’s Messenger sallallaahu 'alayhi wa sallam said:** “When a human being dies, all of his deeds are terminated except for three types: an ongoing sadaqah, a knowledge (of Islaam) from which others benefit, and a righteous child who makes du’aa for him.” (Muslim and others).
**
Abu Qataadah rahimahullaah reported that Allaah’s Messenger sallallaahu 'alayhi wa sallam said: **“The best that a man can leave behind after his death are three things: a righteous child who makes du’aa for him, an ongoing sadaqah whose rewards continue to reach him, and a knowledge that continues to be implemented after him.” (Ibn Maajah, and others).
**Abu Qataadah rahimahullaah reported that Allaah’s Messenger sallallaahu 'alayhi wa sallam said: “Among the good deeds that continue to benefit a believer after death are: a knowledge that he taught and disseminated, a righteous child who lived after him, a Qur’aan book that he left as inheritance a masjid that he built, a house that he built for the two wayfarers, a stream that he ran, or a charity that he gave from his wealth during his healthy lifetime so that it would reach him (in rewards) after death.” (Ibn Maajah and others).Commenting on this, al-Mundhiri rahimahullaah said: “Some scholars say that the deeds of a human being end with his death. However, since he had caused these things (which are mentioned in the above hadiths), such as the earning of a child, disseminating the knowledge among those who take it from him, compiling a book that remains after him, or establishing a sadaqah, the rewards of these things continue to reach him as long as they continue to exist.” (‘Awn al-Ma’bud, 8:86)
The reason that one continues to receive rewards for these deeds even though they are done by other people, is that he had initiated them during his life or contributed to them to a certain degree, whether little or large. Since Allaah does not neglect an atom’s weight of deeds, He records these contribution for a person even after his death. Abu al-Wafaa’ bin ‘Aqeel said: “The best explanation for this in my view is that a human being, by his efforts and good conduct, had earned friends, produced children, married spouses, done good, and was amiable to the people. Because of this, they invoke mercy for him and do good on his behalf. All of this is then a result of his own earning.” (ar-Ruh, Ibn al-Qayyim, p.171). **And Rasheed Ridaa rahimahullaah said, “Among the deeds that benefit a person, even though they are done by others, are those that count like his own because he caused them, such as his children’s supplication for him, or their performing hajj, giving sadaqah, or fasting on his behalf - all of which having been established with authentic hadiths.” (Tafseer al-Manaar 8:247)
**
The above hadiths indicate that a righteous child benefits his deceased parents with du’aa. It is further demonstrated here that he can benefit them by spending sadaqah, as well as doing other charitable deeds, on their behalf. 'Aishah rahimahullaah reported that Allaah’s Messenger sallallaahu 'alayhi wa sallam said, “Indeed the best that one eats is that which he earns. And his child is from his earning.” (Ahmad, Abu Dawud, and others. Verified sahih by al-Albaanee in Akhaam ul-Jana’iz, 217).
The reason for this is that a parent benefits himself by rearing his child according to the teachings of Islaam, and exerting a consistent effort to raise him as a righteous person. As the child grows into adulthood and does righteous deeds, his parents deserve a merit in that they helped him accomplish that and his good actions are therefore, at least in part, from his parents’ earning. Sadaqah from a child A’ishah rahimahullaah reported that a man asked Allaah’s Messenger sallallaahu 'alayhi wa sallam, “My mother had a sudden death, and did not have chance to bequeath anything. Had she been able to do, I think that she would have given sadaqah. Would she or I get any rewards if I give sadaqah on her behalf?” He sallallaahu 'alayhi wa sallam replied, “Yes! So give sadaqah on her behalf” (al-Bukhaaree, Muslim and others).
Ibn 'Abbas rahimahullaah reported that Sa’d bin 'Ubadah’s mother died during his absence on a trip. He came to the Prophet sallallaahu 'alayhi wa sallam and asked him, **“O Allaah’s Messenger! My mother has passed away during my absence. Would it be of benefit to her if I give sadaqah on her behalf?” He sallallaahu 'alayhi wa sallam replied, “Yes!” He said, “Be my witness then that I give my fruitful garden as sadaqah on her behalf.”
**
Abu Hurayrah rahimahullaah reported that a man asked the Prophet sallallaahu 'alayhi wa sallam **“My father has died, leaving behind a wealth; but he did not bequeath anything. Would it help him if I give sadaqah on his behalf?” He sallallaahu 'alayhi wa sallam replied, “Yes!”. (Muslim, Ahmad and others).
**
Abdullaah ibn 'Amr rahimahullaah reported that al-'Aas bin Waa’il as-Sahmee (his grandfather) bequeathed that one hundred slaves be freed on his behalf. His son, Hishaam freed fifty; and 'Amr wanted to free the other fifty, but decided to ask Allaah’s Messenger sallallaahu 'alayhi wa sallam first. He came to the Prophet sallallaahu 'alayhi wa sallam and said, “O Allaah’s Messenger sallallaahu 'alayhi wa sallam! My father has bequeathed that one hundred slaves be freed on his behalf. Hishaam has freed fifty and fifty are left. Should I free them for him?” He replied: “Had he been a Muslim, your freeing slaves, giving sadaqah, or performing Hajj on his behalf would all have reached (in rewards) and benefited him.” (Ahmad, Abu Dawud, al-Bayhaqi)
Commenting on these hadiths, ash-Shawkaani said: "This indicates that the rewards for a sadaqah from a child reach the parents after their death - even if they had not bequeathed it. These hadiths restrict the general meaning of Allaah’s subhanahu wa ta’ala saying: “And that the human being can have nothing but what he has earned.” (53:39)