My son and I race and have both suffered from headaches. Buying new helmets solved both our problems, whether it was the weight difference/pressure on neck or just the padding inside, I'm not sure.
Granted we both went from "Joe Soap" helmets to something decent. Me Airo and son Fox. I strange thing it that for both of us, the Joe Soap helmets were fine for us for many months, mine for a few years. So having said that makes me think that the inside padding must have changed over time, putting different pressure on different parts of the head?
The other thing is that both the new helmets have much better cooling/ventilation. This has stopped our heads from getting hot, this may be the most plausible answer, but does not explain why the Joe Soap helmets were OK for a while. Change in padding adding to more heat?
This is getting rather scientific.
Note - Our drinking practice had not changed. We both drink big time, usually USN Cytomax. I go through about a litre very hour.