Can One Spouse Wash the Other after Death?
Question

Can the husband wash his wife if she dies? By the same token, can the wife wash her husband if he dies?
Praise be to Allah.Can husband or wife give Ghusl to the other after death?
It is permissible for a man to wash his wife , and for a woman to wash her husband, even if the woman is observing `Iddah following a revocable divorce .
Evidence for the permissibility of the husband giving Ghusl to dead wife
The fact that it is permissible for a man to wash his wife is indicated by the Hadith of `Aishah (may Allah be pleased with her), who said: The Messenger of Allah (blessings and peace of Allah be upon him) came back from a funeral in Al-Baqi` and I had a headache and was saying, Oh my head. He said, “Rather, I should say, Oh my head. It will not matter if you die before me, for I will wash you and shroud you, then I will offer the funeral prayer for you and bury you.” (Narrated by Ahmad, 25380; Ibn Majah, 1456; classed as authentic by Shaykh Al-Albani in Sahih Ibn Majah, 1/247)
It was narrated from Asma’ bint `Umays (may Allah be pleased with her) that Fatimah (may Allah be pleased with her) left instructions that `Ali (may Allah be pleased with him) should wash her. (Narrated by Ash-Shafi`i, 1/312; Ad-Daraqutni, 2/79; Al-Bayhaqi, 3/396. Its Isnaad (chain of narration) was classed as spound by Ash-Shawkani in Nayl Al-Awtar, 4/35) 
Ash-Shawkani (may Allah have mercy on him) said: “The words of the Prophet (blessings and peace of Allah be upon him), “for I will wash you”, indicate that a wife may be washed by her husband if she dies.” (Nayl Al-Awtar, 4/35) 
As-San`ani (may Allah have mercy on him) said concerning the Hadith of Asma’ (may Allah be pleased with her): “This indicates that this was something that was well-known during the life of the Prophet (blessings and peace of Allah be upon him).” (Subul As-Salam, 1/478)
This is also the view of the majority of scholars (may Allah have mercy on them). 
An-Nawawi (may Allah have mercy on him) said: “With regard to washing his wife, it is permissible in our opinion and according to the majority of scholars. This was narrated by Ibn Al-Mundhir from `Alqamah, Jabir ibn Zayd, `Abd Ar-Rahman ibn Al-Aswad,… Malik, Al-Awza`i, Ahmad and Ishaq (may Allah have mercy on them). It is also the view of `Ata’, Dawud and Ibn Al-Mundhir. Abu Hanifah and Ath-Thawri stated that he cannot wash her; this was also narrated from Al-Awza`i. They quoted as evidence the fact that the marriage has ended (with the death of one of the spouses), so it is akin to a complete and irrevocable divorce.” (Sharh Al-Muhadhdhab, 5/122) 
In Majmu` Fatawa Ash-Shaykh Ibn Baz (may Allah have mercy on him), 13/109, it says: 
Some of the jurists were of the view that the marital relationship comes to an end with death; what is your view on this issue? 
He replied: 
“This is a view that is contrary to the Sunnah, so no attention should be paid to it.”
Evidence for the permissibility of the wife giving Ghusl to dead husband
With regard to a woman washing her husband , this is supported by the Hadith of `Aishah (may Allah be pleased with her), who said: If I had known beforehand what I know now, no one would have washed the Messenger of Allah (blessings and peace of Allah be upon him) but his wives. (Narrated by Abu Dawud, 3141; classed as authentic by Shaykh Al-Albani (may Allah have mercy on him) in Ahkam Al-Jana’iz, 1/49)
An-Nawawi (may Allah have mercy on him) said: “Ibn Al-Mundhir narrated in his two books, Al-Ishraf and Kitab Al-Ijma`, that the Ummah unanimously agreed that a woman may wash her husband. Others also narrated that there is consensus on this point.” (Sharh Al-Muhadhdhab, 5/114) 
And Allah knows best.