FACT: Hangovers are a painful experience. The splitting headaches are caused by the brain shrinking effect that occurs when dehydrated. Essentially, less water makes the brain shrink and hurt, but how can the brain be dehydrated after a lot of drinking? It almost seems paradoxical but the explanation is logical.
The key lies in what was being drunk, namely alcohol. A little known fact about alcohol is that it causes one to produce higher levels of urine in comparison to how much one drinks, meaning that while alcohol may hydrate you temporarily it will always leave you with less water. This leads to the dry mouth and lethargy people often feel as part of a hangover. It is also why you should never drink wine or beer to regain liquids, always have a soft drink.
Anyway, this initial dehydration is not enough, to cause the full hangover experience. As you may know, whilst one is out drinking, they do not experience these headaches of dry mouths. This is because of what happens during the sleep afterwards.
During sleep your body digest all of the easily digestible parts of the alcohol then sets about the very difficult task of absorbing ethanol. The process involves changing it into many different substances, all of which need water. So water is taken and used for the chemical reaction, resulting in great water loss through the night. This causes the brain to shrink.
Combine that headache to lethargy and a dry mouth when one wakes up and voila! Now you have a complete hangover.