I've read babies may do it when a bit over-tired, releasing aggression etc and it may help if you encourage him to bang plastic cubes/balls to release aggresstion or give him more cuddle time to soothe him.
They may also do it for the fun of it once they discover they can but should outgrow quickly.
ETA: Gina did this for a day or so early last week but not since - thank goodness as I can't stand the sound either
Edited by yummymummy