When you are hungover you are dehydrated therefore water from your cerebrospinal fluid moves in to the body to try and compensate. This results in there not being enough fluid to cushion your brain from banging on the walls of the brain box which causes the pain. The same effect can be achieved by having a lumbar puncture and sitting up directly afterwards. (When we say stay lying down for an hour afterwards we mean it. Believe me you only make that mistake the once). Alcohol also irritates the lining of the stomach causing you to be nauseous. (to put it another way your body has decided you are an idiot and are trying to kill it so trys to stop you adding any more poison to the problem). Then there is the fact that you probably drunk so much you wake up still drunk causing the room to spin etc.
So to sum up you’re massively dehydrated have a headache so bad it makes you want to kill your self and every time you try to take some pain killers or drink some water you throw it up a couple of minutes later.
Also you should bear in mind that if you drank enough to do this to your body you were nearly at the limit of causing acute liver failure and or actually killing your self with alcohol poisoning so you might want to ease up next time.
So to sum