Last week I had a headache. Two hours in a traffic jam, hot day, no water, plans thrown into chaos. That day I was one of the five million Australians affected by headache or migraine. Over a year one person in two will experience a headache.

Mine was a "tension-type" headache, the most common category. Migraines are less common but about one person in eight will experience one in any given year.

Headaches are really common, so here are five things the research evidence indicates are worth trying to help manage or avoid them.

1. Water

A study was conducted in people who got at least two moderately intense or more than five mild headaches a month.

The participants received a stress management and sleep quality intervention with or without increasing their water intake by an extra 1.5 litres a day.

The water intervention group got a significant improvement in migraine-specific quality of life scores over the three months, with 47 percent reporting their headaches were much improved, compared to 25 percent of the control group.

However, it did not reduce the number or duration of headaches. Drinking more water is worth a try. Take a water bottle everywhere you go and refill it regularly to remind you to drink more water.

2. Caffeine

Caffeine can have opposing effects. It can help relieve some headaches due to analgesic effects but also contribute to them, due to caffeine withdrawal.

A review of caffeine withdrawal studies confirmed that getting a headache was the number one symptom of withdrawal, followed by fatigue, reduced energy and alertness, drowsiness, depressed mood, difficulty concentrating, fuzzy head and others.

When people were experimentally put though controlled caffeine withdrawal, 50 percent got a headache, with withdrawal symptoms occurring within 12-24 hours, peaking between 20-51 hours and lasting from two to nine days.

Caffeine withdrawal can happen from a usual daily dose as low as 100 mg/day. One cup of brewed coffee contains 100-150 mg caffeine, instant coffee has 50-100 mg depending on how strong you make it and a cup of tea can vary from 10-90 mg.

It appears that maintaining usual caffeine consumption may subconsciously relate to avoidance of withdrawal symptoms.

Caffeine can dampen down pain. in a systematic review that included five headache studies with 1,503 participants with migraine or tension-type headache, 33 percent of participants achieved pain relief of at least 50 percent of the maximum possible after receiving 100 mg or more caffeine plus analgesic pain medication (ibuprofen or paracetamol) compared to 25 percent for the analgesic group alone.

A study in over 50,000 Norwegians, who have high caffeine intakes (more than 400 milligrams a day), examined the relationship with headaches. Those with the highest caffeine intakes (more than 540 mg/day) were 10 percent more likely to get headaches, including migraine.

But when headache frequency was examined, high caffeine consumers were more likely to experience non-migraine headaches infrequently (less than seven per month) compared to those considered low caffeine consumers (less than 240 mg a day).

This was attributed to potential "reverse causation" where high caffeine consumers use caffeine to damp down headache pain.

They found those with the lowest caffeine intakes (125mg a day) were more likely to report more than 14 headaches per month, which may have been due to greater sensitivity and avoidance of caffeine.

Hypnic headaches are a rare type that occurs in association with sleep.

They typically last 15-180 minutes and are more common in the elderly. Hypnic headaches are treated by giving caffeine in roughly the amount found in a cup of strong coffee.

3. Fasting

Some people get a headache after fasting for about 16 hours, which equates to not eating between 6pm and 10am the next day. A study in Denmark found one person in 25 has been affected by a fasting headache.

These headaches are most likely to occur when fasting for a blood test or medical procedure or if you are following a "fasting" weight loss diet or a very low energy meal replacement diet.

Fasting headaches are likely to be confounded by caffeine withdrawal. Check the test procedure instructions to see what fluids, such as tea, coffee and water are allowed and drink within those recommendations.

In a study 34 people with new-onset migraine who kept a headache diary for about a month, those who ate a night-time snack were 40 percent less likely to experience a headache compared to those who didn't snack.

For susceptible individuals this may prevent fasting headaches. Try a slice or wholegrain toast with a topping like cheese and tomato or avocado and tuna, with a cuppa.

4. Alcohol

Headache is the classic feature of alcohol induced hangovers. The amount of alcohol needed to trigger a hangover varies widely between individuals, from one drink to many.

A number of factors mash up to produce a throbbing post alcohol headache. Increased urination and vomiting both increase risk of dehydration which leads to changes in blood and oxygen flowing to the brain.

Congeners, a group of chemicals produced in small amounts during fermentation, give alcoholic drinks their taste, smell and colour. Metabolites of alcohol breakdown in the liver can cross the blood-brain barrier contributing to hangover.

Alcohol can trigger tension-type headaches, cluster headaches and migraine.

People with migraines have been shown to have lower alcohol intakes compared to others.

The wise advice is to drink responsibly, boost your water intake and don't drink on an empty stomach. If you are sensitive to alcohol, avoidance is your best option.

5. Boost your intake of folate-rich foods

Some migraineurs are diet-sensitive. Triggers include cheese, chocolate, alcohol or other specific foods.

A recent study found women with low dietary folate intakes had more frequent migraines. However a daily folic acid (1 mg) supplement made no difference.

The ConversationBoost your intake of foods rich in folate such as green leafy vegetables, legumes, seeds, chicken, eggs and citrus fruits.

Use our Healthy Eating Quiz to check your nutrition, diet quality and variety. Keep a headache diary to identify triggers and then discuss it with your GP.

Clare Collins, Professor in Nutrition and Dietetics, University of Newcastle.

This article was originally published by The Conversation. Read the original article.