When Kathy McCoy started taking a new blood pressure medication, she felt a little dizzy, so she asked her husband to drive her to work.

Over the next few days, her dizziness subsided, but then McCoy got fatigued and turned very pale. She called the physician who’d switched her meds, who told her to stick with the medicine, verapamil (a calcium channel blocker), for another week.

The next day, while driving to the bank on a suburban Los Angeles street, she passed out behind the wheel and crashed into an SUV. “The next thing I knew, the other driver was leaning over me, saying, ‘Are you OK?’” McCoy says.

Related: How to Avoid a Dangerous Pharmacy Mix-Up

No one was injured, but her car was totaled (the SUV got only a scratch) and her license was suspended for four months, pending investigation. The conclusion: An adverse reaction to the medicine caused McCoy’s accident.

“Thank God I didn’t hurt anyone,” she says.

A slew of different prescription medications can cause dizziness, drowsiness or lightheadedness, which can be dangerous, especially behind the wheel. In some cases, a patient’s body might just need time to adjust to the drug, while in others, a doctor may need to make some changes.

Here are four common categories of medication that can cause dizziness or drowsiness.

Antidepressants. Some common medications for depression can cause dizziness and/or drowsiness. They include bupropion (brand names include Wellbutrin and Zyban) and venlafaxine (brand name Effexor) can cause dizziness, according to the FDA. And desvenlafaxine (brand names Pristiq and Khedezla) can cause dizziness, sleepiness or tiredness. (Some of these drugs are also used to treat other conditions.)

Related: These Prescription Drugs Are the Most Likely to Hurt You

Blood pressure medications. As Kathy McCoy found out, blood pressure medications also can have dizzying side effects. For example, angiotension-converting enzyme (ACE) inhibitors such as enalapril (brand names Vasotec, Epaned), ramipril (brand name Altace) and others can cause dizziness and tiredness, according to the FDA. Beta blockers, such as atenolol (brand name Tenormin) and metoprolol (brand names include Lopressor and Toprol-XL) and others can cause dizziness or feeling lightheaded. And calcium channel blockers, such as amlodipine (brand name Norvasc) and verapamil (brand names include Calan, Isoptin SR and Verelan),can cause drowsiness. (Many of these drugs also are used for other conditions. For example, ramipril and metoprolol are prescribed to some patients with heart failure.)

Related: Natural Treatments for High Blood Pressure

Prescription pain medications. Many prescription pain medications are opioids (formerly known as narcotics), very strong drugs that attach to receptors in the brain and elsewhere in the body to lessen pain. Commonly prescribed opioids, such as codeine, hydrocodone, oxycodone and morphine, can cause drowsiness, according to the FDA. Don’t drive or operate machinery, especially when you first start taking an opioid, the FDA warns.

Related: Think Twice Before You Take a Prescription Painkiller

Sleeping pills. The whole point of sleeping pills is to help you nod off and/or stay alseep, the FDA has warned that the effects of too-high doses can linger the following day, making driving dangerous. For example, in 2014, the FDA reduced the recommended dose of eszopiclone (Lunesta) from 3 milligrams to 1 milligram at bedtime.

How to safely take meds that might make you dizzy or drowsy

Medications that cause dizziness or drowsiness can be dangerous not only when you’re on the road but also at home. If you get dizzy, you could fall and hurt yourself. (That also happened to McCoy with a different blood pressure medication, when she took her pill right before getting into a hot shower, then fell and knocked out her front tooth.)

When you start taking a new medication, you and your doctor should discuss any possible side effects, says Frank Ditz, MD, a Florida primary care doctor and member of SignatureMD, a medical concierge service.

When you first start taking a medication that commonly causes dizziness or drowsiness, avoid tasks that could be dangerous, such as driving, climbing ladders or operating tools such as power saws, Ditz says. “These are all terrible things to do,” he says.

If you do experience side effects, call your doctor, Ditz says. It can take time to adjust to a new medication, and some side effects will go away within a few weeks to a month, he says.

However, if you’re not tolerating a new medication well, your doctor can work with you to make adjustments, he says. One option might be simply changing the time of day you take the medication — so, if it’s a once-a-day pill, taking it in the evening instead of the morning. Other solutions might include lowering the dose — or lowering the dose, then increasing it again slowly — or switching to a different medication, Ditz says.

And if you’re taking a medication and you experience dizziness, lightheadedness, tiredness, vertigo or other symptoms, don’t just assume it’s caused by the meds. It could be something else, possibly even a serious health problem.

“If you feel anything significantly out of normal, it’s best to talk with the provider or pharmacist or call 911,” Ditz says.

Allie Johnson is an award-winning freelance consumer writer with a degree in magazine journalism. She lives in Georgia with her husband and two dogs.