Features
This is common <4 yrs when going to sleep, esp. at 3 yrs.
It is also a feature of severe emotional deprivation.
It is quite different to a child hitting the head with the hands.
Management
Reassure parents that the problem usually settles by 2–3 yrs.
Advise distraction or actively ignoring the behaviour.
Avoid reinforcing it by excessive attention or punishment.
Advise placing bed or cot in middle of room, away from wall.
Restrict bedtime (if appropriate).