More than three million Americans take the hormone melatonin to help them sleep. Most people assume it is safe. But this supplement can reduce the effectiveness of certain medications, and it has potentially dangerous side effects. What’s more, many people who take melatonin do so at the wrong times or for problems that it will not solve.

Contrary to popular belief, a melatonin supplement will not help you fall asleep—but it could help you sleep through the night if you chronically wake up way too early and cannot fall back asleep. (This sleep pattern is particularly likely among people in their 50s or older—our natural melatonin production decreases as we age.) A melatonin supplement also can help shift your sleep schedule following travel between time zones, reducing jet lag.

Melatonin supplements are safe for most people, but they have been shown to decrease the effectiveness of certain crucial medications including blood pressure drugs, seizure-prevention drugs, antidepressants and birth control medications. They can increase blood sugar levels, too, making them potentially dangerous for diabetics.

Other potential side effects include headaches, dizziness, stomach irritation, irritability, short-term depression and grogginess. These side effects are most likely when people take excessive doses—but almost everyone takes excessive doses. An appropriate initial adult dose typically is 0.5 milligrams (mg), but most melatonin supplements contain three, five or even 10 mg per pill.

What to do: If you have trouble remaining asleep through the night or want to head off jet lag, take a 0.5 mg dose of melatonin 90 minutes before bedtime to give it time to be released into the bloodstream and reach the brain. If you wait until bedtime, you might still be groggy in the morning.

If this proves ineffective, gradually increase the dosage on future nights until you find a level that works for you, but do not exceed 5 mg. (If you have diabetes or are taking medications for any of the health conditions mentioned, consult with your doctor.)

If your problem is falling asleep, not remaining asleep, try the herbal sleep inducer valerian root instead.