Nak
My daughter used to rub a soft blanket on her face to fall asleep. At 5 she buries her face in her blanket and makes a "mmmm" happy noise. I think everyone finds their own self-soothing techniques. As adults it might be a cup of tea or just the daily routine of in bed by 11, but some adults still have snuggle friends (body pillow anyone?). I certainly wouldn't be conerned about the kiddo wanting to snuzzle on hair. The texture could just make her feel super relaxed.. The way that the texture of silk sheets makes some people feel super relaxed too.
I do understand how it has got to be fustrating to put the little girl to bed with your hair clenched in her tiny fist. (My 7 month old son likes to grab me by the hair and pull my face to his so he can suck on my nose.) So I agree with previous posters that you might want to experiment with other things that might soothe her. A stuffed animal with long fuzz, a baby doll with long hair, a soft blanket etc. If I were you, I'd scour the house for replacement items and keep them next to the area where you put your little one down to sleep. Each time she reaches for your hair, I'd let her try a new item. See if anything gives her the same cozy feeling. Don't let her become overstressed about it though. If you've tried the taggie blanket, the dolly, and the brand new mop head and now she's red in the face and yelling, then just let her have your hair and resolve to try again tomorrow.
Now, I don't mean that you should just continue to let her pull on your hair indefinately. But, obviously you found out that she had aquired this habit "for a few months" by allowing her to do it. So, just keep offering other items to see if they work and as a last resort just continue as you have been.
Oh, also I also feel like I have to add that you shouldn't let baby keep any items that might harm her throughout the night. Slip them out of her sleeping area after she is out cold.
Follow Mothering