A few years ago my pony was shaking his head when eating his hay and it turned out he had cut his tongue on something. Interestingly he kept up the behavior for perhaps a week after his tongue had more or less recovered which I put down to learned behavior.