All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
Anything which causes a man to see the ‘Awrah (i.e. parts of a woman’s body that should be covered), regardless of being a Mahram to him is unlawful. So it is impermissible for a man to attend the washing of the dead body of his Mahram in such a way as to enable him to see her ‘Awrah, whether she is his mother-in-law or any of his prohibited consanguinities. According to scholars, the dead woman should be washed by women or her husband. But, if there is neither a husband nor any woman, her Mahrams should then wash her dead body while screening it and putting a piece of cloth over the hand of the washer in order not to sense the softness of her body.
Allaah Knows best.