Nafi' narrated from Sayyiduna Ibn Umar (may Allah be pleased with them) that when his wives and slave-girls performed the ritual bath (ghusl) for menstruation or major impurity (janabah), they would not undo their hair, but they would be thorough in pouring water (so that the roots would be well soaked and water would reach them).
Hadith Referenceسنن دارمي / من كتاب الطهارة / 1198
Hadith Takhrijاس روایت کی سند جید ہے۔ دیکھئے: [مصنف ابن أبى شيبه 74/1] و رقم اثر (1191)۔
Brief Explanation
(Commentary on Ahadith 1196 to 1198) From all these traditions and ahadith, it is understood that a woman does not need to undo her braids (plaits) for the ritual bath (ghusl) of janabah (major ritual impurity) or for the ritual bath after menstruation (hayd), however, she should ensure that water reaches the roots thoroughly so that the roots do not remain dry. And Allah knows best.