I strongly disagree with the folks that say that your hair is a "toy". My hair is your average short men's haircut (maybe 2 inches long per hair on average), so that's not much of a toy.
My cat is an indoor cat and will get on the back of the sofa behind me and tug at my hair like an outdoor cat would probably pull on green grass for roughage in their diet. The first time my cat did this was when she was very young in her "kitten teenager" age, I thought she was being hostile, but since that wasn't like her I waited for a bit to see what she would do instead of instantly brushing her away like I was initially inclined to do, but never never ended up doing. She just continued pulling and occasionally would put a paw down on my head to try to pull my hair out.
She has always done this from time to time since kittenhood and is now 14 years old, so this isn't something a cat is likely to grow out of unless you constantly brush your cat away and they get the idea that they can't do it.
I've always had two theories as to why cats do this. 1) They think your hair is roughage, like eating grass outside. 2) It's a grooming ritual, much like cats do with other cats. The fact that my cat doesn't also lick my hair, like a cat would do with another cat when grooming, makes me more inclined to think my first theory is accurate.
What do you think? If my theory that this is a roughage replacement is true, it'd be interesting to see if it's mostly indoor cats that exhibit this behavior, or whether outdoor cats and indoor/outdoor cats do this as well. So, if you can post whether your cat is a strictly indoor or outdoor cat or whether your cat is an indoor/outdoor cat, I think it would be helpful to the discussion. Thanks.