My cat does the same thing but she bites fingers and toes (and i'm extremely tickilish, so imagine what i go through). She wakes me up in the middle of the night just to play. If you have a kitten I guess your best option other than shutting them out is to let them grow out of it.
Take a small spary bottle and fill it with water, every time the cat does it just give it a quick shot of water, not a lot just a bit. It will soon learn that clawing your hair directly results in a shot of water and will stop.
Unfortunately he won't grow out of it as he's 10 years old! He only just started doing it recently and shutting the door results in torn carpet and scratched paintwork! I'll try the water thing Wowo, cheers.