As odd as it may sound, most toddlers who indulge in the behavior do it to relax. In these cases, developmental experts believe that head banging is a child's way of calming himself so he can sleep. Head banging can also soothe a child in pain. Infants and toddlers are more likely to bang their head when they're teething or suffering from an ear infection. Head banging apparently helps them feel better, perhaps by distracting them from the discomfort in their mouth or ear.
Some youngsters bang their head during temper tantrums as a way of venting strong emotions.
They haven't yet learned to express their feelings in words, so they use physical actions. More rarely, ongoing head banging may also be a way for a child to get attention. Understandably enough, parents tend to become solicitous when they see their child doing something that appears self-destructive. And since children like it when their parents fuss over their behavior, they may continue head banging if it seems to be getting them a lot of unusual attention. And finally, and more rarely, head banging is associated with certain types of autism and mental retardation.