Ball Pythons do this all the time. As far as damage, I'm not qualified to speak on this as fact. I would however think that if the snake hits it's head enough times, hard enough, some damage would occur. Kinda like a boxer, if they're hit enough times some damage will occur.
But as I've said, I've seen this a number of times. One way to prevent this from happening is to house your snake in an enclosure which is not so tall, so it cannot do this.
Good Luck!
Jim Smith