How old is the cat? I have had kittens that will do this when playing, but they grew out of it.

Otherwise, try a spray bottle- it worked for us to get our 1 year old to stop pouncing on our feet in bed at night.