I’m a 38-year-old woman, and I get migraine headaches occasionally, usually one every few months. I have a hard time functioning when I have a migraine. I don’t want to take medication for this problem if I don’t have to. Are there ways to prevent or treat migraine headaches without medication?

ANSWER: Even if you don’t get them very often, migraine headaches can have a big impact on your life. A number of lifestyle changes may help reduce how often you get a migraine. But if they continue, talk with your doctor about other treatment options.

Migraine headaches involve moderate to severe pain that is often throbbing and typically affects one side of the head. The pain usually gets worse with exertion such as climbing stairs. Additional symptoms, such as nausea, vomiting, and sensitivity to light and sound, also accompany a migraine attack.

For some, a migraine is preceded by an aura such as seeing spots or bright flashes of light or feeling tingling or numbness on one side of the body. About 38 to 40 million people in the U.S. have migraine. Many are women in their reproductive years. Hormones appear to play a role in migraine. Genetics seem to be connected to these headaches, too. About 60 to 70 percent of people who get migraine have one or more family members with a history of migraine headaches.

A variety of triggers can set off a migraine attack. Fasting and dehydration are common migraine triggers. Eating and drinking plenty of water throughout the day may help ward off some headaches. Getting enough sleep also is important. Lack of sleep has been shown to be closely associated with migraine attacks in some people. Six to eight hours of sleep a night appears to be about the right amount for adults. In many people, less than six hours of sleep is linked to more frequent headaches. Interestingly, sleeping more than eight hours may cause more headaches in some people, as well.

In about 30 percent of migraine sufferers, certain foods and beverages can induce a headache. Alcohol is a common migraine trigger, especially wine. People frequently cite caffeine or caffeine withdrawal, chocolate, certain kinds of beans and nuts, processed meats, and some food additives as triggers. If you think a certain food or beverage could be linked to your headaches, consider limiting it or cutting it out of your diet to see if that makes a difference.

Stress is associated with migraine. If you have a lot of stress in your life, or if your headaches seem to be associated with specific stressful events, consider ways to lower that stress as much as possible. Release from stress (e.g., vacation, the weekend) is also a recognized migraine trigger.

Exercise can be a particularly good way to help prevent migraine headaches. Research has shown that exercising on a regular basis can make headaches less likely and may lower headache severity when they do happen. Mind/body practices, such as yoga and tai chi, can be quite useful in managing migraine, too.

If you catch them early, occasional migraine headaches typically respond to medication. Over-the-counter painkillers, such as ibuprofen or acetaminophen, may be all you need for mild to moderate migraine headaches. If taken too often or for too long, over-the-counter migraine medications could lead to other problems, such as ulcers, gastrointestinal bleeding and rebound headaches. When taken occasionally, however, they are generally safe and may provide you some relief.

Prescription medications are effective for more severe migraine attacks. Preventive anti-migraine medications are available for patients with frequent, severe migraine headaches that do not respond to acute therapy.

If you try these strategies and find that you still get the same amount of headaches, consider making an appointment to see your doctor. He or she may be able to recommend additional lifestyle changes or discuss the role medication could play in managing your headaches. —Robert Sheeler, M.D., Family Medicine, Mayo Clinic, Rochester, Minn.