Yes, I used to rock back and forth in my crib, banging my head against the crib. My parents eventually put a pillow there so I wouldn't do any damage
I stopped doing it around age 5. I do recall doing it one time when I was extremely depressed/angry. I was fuming with emotion while in a heated discussion with my parents, and hit my head on the wall purposely. I suppose this was because I didn't have any other way to express my feelings, and I wasn't the type to throw my fist into a wall when I was angry at someone else.