As Salaamu Alaikum,
Yes, it is permissible for a wife to do ghusl (bath) for her deceased husband, since on account of her iddah period, her relation of marital ties with that husband continues to exist, until it comes to an end. However, it would not be permissible for a husband to give the ghusl (bath) to his deceased wife, since with her death, their marriage has come to an end.
And Allah Knows best
Mufti Waseem Khan
15/4/2025