In Islam, women are ordered to observe the good commands of their husbands, fulfill their husbands’ rights and perform their duties. Allah has assigned a great reward for doing so, in light of the Hadith of the Prophet (peace and blessings of Allah be upon him) in which he said, “If a woman performs her five (daily Prayers), fasts her month (Ramadan), guards her chastity and obeys her husband, it will be said to her, “Enter through whichever of the gates of Paradise you wish.” (Musnad Ahmad)
Also, it is taken for sure that being loyal to the husband’s family during his life for a wife is included in dutifulness to him. This is not obligatory on her but is required because they are the family of her husband and their offspring. The Prophet (peace and blessings of Allah be upon him) said, “The best of you is the best to his family, and I am the best of you to his family.” (Al-Tirmidhi and Ibn Majah).
Regarding what a wife could do to benefit her deceased husband, we exhort the wife to supplicate for her husband and ask Allah’s forgiveness for him, and be sure that Allah will accept her invocations. Also, if she has children from him, bringing them up on righteousness and piety is the best thing she can present to her husband, as he will be rewarded for the good deeds his dutiful descendants will do. It was narrated on the authority of Abu Hurairah that the Prophet (peace and blessings of Allah be upon him) said: “A man may be raised in status in Paradise and will say, “Where did this come from?” It will be said to him, “From your son’s praying for forgiveness for you.” (Ibn Majah). Also, the Prophet said, “If a man dies, all his good deeds come to an end except three: ongoing charity, beneficial knowledge or a righteous son who will pray for him.” (Muslim)