All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The marital relation comes to an end only by divorce, Li'aan (invoking mutual curses when the spouses accuse each other of adultery), Khul’ (divorce demanded by the wife), annulment of marriage, and by the death of the spouse as well.
The majority of Muslim scholars, among them the three Imams Maalik, ash-Shafi'i, and Ahmad are of the opinion that a husband can bathe his dead wife and vice versa.
The evidence for this opinion is the Hadeeth narrated by Imam Ahmad (in al-Musnad), Ibn Maajah (Ibn Hibban graded it as sound) from ‘Aa’ishah that the Prophet said to her: “If you die before me, I will bathe you.”
Imam ad-Daaraqutni narrated from Asmaa’ Bint Umays that Faatimah made a will that ‘Ali, should bathe her after her death.”
Imam Ibn Hajar regarded it as Hasan.
Allah knows best.