Asking on HomeBrewTalk about the cause of post-drinking headaches usually breaks down into a few predicable catergories:
Group 1. (~10%) You suck, I drink 100 beers a night with no hangover.
Group 2. (~30%) Regardless of how much water you drink, you were dehydrated.
Group 3. (~50%) Your must have fermented your beers really hot, I have read on the internet that hot fermentation causes fuesels, which cause hangovers.
Group 4. (~20%) Hangovers are really easy to prevent, just follow my secret hangover plan...
Truth is, no one really knows what causes hangovers. There are studies that have been done on everything from alchohol to dehydration, fusel oils, sulphites (wine), acetaldehyde, drinking speed, cogeners, excercise, the morning after, and everything in between. There is no consensus on the real cause(s), or the way it works in the human body. I read a really informative meta-study published by a group of researchers talking about all the work done so far, but I lost the link and can't seem to find it.
You can try any or all of the following: reduce fermentation temps (reduce fusels), make sure beer has 3+ weeks in the bottle (to remove acetaldehyde), try different ingredients (some people have adverse reactions to darker malts). And of course limiting consumption is always a good idea. Let us know if anything changes.