use a thick conditioner/hair mask. leave the conditioner in for as long as possible, try to massage it through the knots but don’t worry about trying to comb them all out it this point.
rinse the conditioner out, but don’t over-rinse, if there’s some residual conditioner left, no big deal.
gently towel dry by squeezing hair in the towel - or twist into a towel turban for a bit - but don’t rub the towel back and forth as this will make any knots worse.
brush through in sections, start at nape of the neck. We swear by a Wet brush pro - my hairdresser recommended it for my dd with similar issues and we’ve never looked back! (Available in boots & on Amazon and prob other shops just never looked!) we use the largest size most of the time, but have a couple of the smaller ones for school bags/in the car - very handy!
if she tolerates it, use a hairdryer to dry the ends (to stop the dripping) and on the roots, but no need for it to be bone dry unless that’s the preference.
we do pigtails for bed, not super tight, but it stops the hair at the back of her head/neck getting matted again overnight.
if she won’t wear a bonnet, you could try a silk pillowcase, but the pigtails should help.