While we’re all familiar with the delightful symptoms of a hangover (headache, trembling, nausea, fatigue, dehydration, diarrhea), scientists actually are still trying to understand in detail what exactly causes them.
In the past, dehydration was thought to be the main cause of hangover symptoms. But now, scientists believe that alcohol withdrawal, and chemicals formed in the body when our liver breaks down alcohol, also contribute to those dreaded symptoms.
So what exactly happens within our body to cause such horrendous post-alcohol pain? Maybe if we knew what we were doing to ourselves, we could take certain preventive action.
Turns out that there are several ways that alcohol directly contributes to hangover symptoms.
Dehydration and Electrolyte Imbalance
One 250ml glass of wine causes the body to expel 800 to 1,000ml of water. That's four times as much liquid lost as gained, which explains the heavy traffic to the restrooms in bars and restaurants. Excess alcohol consumption can cause dehydration in a variety of ways.
Firstly, alcohol decreases the body's production of anti-diuretic hormone called vasopressin , which is used by the body to reabsorb water. With less anti-diuretic hormone available, your body loses more fluid than normal through increased urination. The effects of alcohol vary from person to person, but in general the less a person weighs the less alcohol it takes to cause dehydration .
And since alcohol causes more urine production, we’re more likely to develop an electrolyte imbalance. These electrolyte disturbances have been linked to a number of symptoms, including headache, nausea and aches.
But dehydration isn’t the only cause of a hangover. Alcohol also induces inflammation, sleep disturbances, acetaldehyde buildup and drops in blood sugar, which can all prompt or exacerbate hangover symptoms.
Alcohol irritates your digestive system. Drinking – even a little – makes your stomach produce more acid than usual, which can in turn cause gastritis (the inflammation of the stomach lining).
Drinking can also make it more difficult to digest food and absorb vital nutrients, particularly proteins and vitamins . That’s because alcohol reduces the amount of digestive enzymes which the pancreas produces to help us to break down the fats and carbohydrates we eat.
Alcohol can also produce fatty liver, gastric acid, and pancreatic and intestinal secretions, all of which can cause abdominal pain, nausea, and vomiting.
According to a review of 27 studies  about alcohol and its effect on sleep, alcohol does allow healthy people to fall asleep quicker and sleep more deeply for a while, but it reduces rapid eye movement (REM) sleep.
While you may fall asleep quickly after drinking, it's also common to wake up in the middle of the night. One explanation is that alcohol may affect the normal production of chemicals in the body that trigger sleepiness when you’ve been awake for a long time, and subside once you’ve had enough sleep. After drinking, production of adenosine (a sleep-inducing chemical in the brain) is increased, allowing for a fast onset of sleep. But it subsides as quickly as it came, making you more likely to wake up before you’re truly rested. 
Another reason people get lower-quality sleep following alcohol is that it blocks REM sleep, which is often considered the most restorative type of sleep. With less REM sleep, you’re likely to wake up feeling groggy and unfocused.
In other words, alcohol may seem to be helping you to sleep, as it helps induce sleep, but overall it is more disruptive to sleep, particularly in the second half of the night
Hangovers could also be driven by the way alcohol messes with your immune system. Studies  have found strong correlations between high levels of cytokines—molecules that the immune system uses for signaling—and hangover symptoms. Normally, the body might use cytokines to trigger a fever of inflammatory response to battle an infection, but it seems that excessive alcohol consumption can also provoke cytokine release, leading to symptoms like headache and muscle aches.
Alcohol consumption also affects histamine, serotonin, and prostaglandins, hormones thought to contribute to headaches.
Tremors and sweating – both common features of hangovers – are due to alcohol withdrawal. The brain adapts even in the course of one evening of drinking and is then left in a withdrawal state for the next 24 hours. That's why some people swear by the “hair of the dog” – another alcoholic drink – to cure their hangover. However, this method merely postpones the inevitable.
Low Blood Sugar
Alcohol consumption can inhibit glucose production in the body and deplete the reserves of glucose stored in the liver. Because glucose is the main energy source of the brain, low blood sugar can produce symptoms of fatigue, weakness and mood disturbances experienced during hangovers.
Alcohol Metabolism in the Liver and Acetaldehyde
Alcohol metabolism is a two-step process in the liver, where enzymes first break the alcohol down into acetaldehyde. This toxin is probably the reason for a lot of the gross feelings that come with a hangover .
That’s because acetaldehyde is highly toxic – between 10 and 30 times more toxic than alcohol itself. The enzymes in your liver are next tasked with breaking down the acetaldehyde further, into a non-toxic substance called acetate. But your liver can only metabolize about one drink per hour – so if you’re drinking more quickly than that, not all of the acetaldehyde gets broken down. It’s kind of like a traffic jam in your liver. This accumulation of acetaldehyde is what causes sweating, a rapid pulse, skin flushing, nausea, and vomiting.
Most alcoholic beverages contain chemical compounds, known as congeners, that contribute to the taste, smell and appearance of the beverage. Alcoholic drinks with high levels of congeners seem to increase the frequency and intensity of hangovers. Studies   suggest that methanol, a common congener, is strongly associated with hangover symptoms.
Drinks high in congeners include whiskey, cognac and tequila. Bourbon whiskey is exceptionally high in congeners. On the other hand, colorless drinks — like vodka, gin and rum — have low levels of congeners. In fact, vodka contains almost no congeners at all.
Bottom line is: you can significantly reduce the severity of hangovers by drinking low-congener beverages, such as vodka, gin or rum.
People who drink heavily often use other drugs and many of them smoke cigarettes. The combined effect of nicotine and alcohol causes a major spike of dopamine, the chemical that’s responsible for the warm-and-fuzzy feeling we get after a couple drinks. But these substances can cause their own set of hangover type symptoms.
Recent research has confirmed that your hangover will be worse if you smoke when you drink. A study  found that people who dragged on a cigarette or two while drinking alcohol were twice as likely to experience painful hangover symptoms than those who boozed without smoking.
Some people get hangovers after a night of drinking, while others don't, and the reason may be in their genes. In a recent study , researchers looked for links between study participants' genetic makeups and the number of hangovers the individuals reported experiencing in the past year. The results showed that genetic factors accounted for 45% of the difference in hangover frequency in women and 40% in men.
In other words, genetics accounts for nearly half of the reason why one person experiences a hangover and another person doesn't, after drinking the same amount of alcohol.
The effect of alcohol on the renal excretion of water and electrolyte.
Relationships between nutrition, alcohol use, and liver disease
Role of Tobacco Smoking in Hangover Symptoms Among University Students
The role of beverage congeners in hangover and other residual effects of alcohol intoxication: a review
Urinary excretion of methanol and 5-hydroxytryptophol as biochemical markers of recent drinking in the hangover state.
Concentration changes of methanol in blood samples during an experimentally induced alcohol hangover state
Effects of alcohol hangover on cytokine production in healthy subjects