I just have to add that my ds (3 yo on thurs!) has done this for a couple of years!!!! He started with mine and dh's hair, at night that drives me bananas. I have nearly completely weaned him to his own hair.
At times, he will knot it up and I just trim it out. No hair loss yet, but I imagine that will be the first place he loses hair as an adult male.
He does this primarily when he is tired (over-tired) or if he is nervous, unsure about a situation. I take it as a cue for assistance.
I don't know what you could do to help your daughter except to pay attention to when she does it (i.e. for help, tiredness, confusion...). Best to you.