I was going to say both of the things Melinda pointed out - the ear infection and/or frustration factors. I new a toddler who would hit themselves in the face/head everytime they became frustrated with something they couldn't do...and they were very independant so trying to assist them just amde it worse.
Good luck with this behaviour - hope it passes soon