It's apparently your body compensating - too much. It feels cold in your mouth - assumes all your heads cold - then pumps loads more blood around your brain giving you the headache. Thats why putting heat and pressure up there with your thumb stops this reaction, and stops the pain.
Just learn to eat cold stuff without it touching the roof of your mouth
And when you've done that - teach me how