Any time a new substance is introduced to the body, there’s a chance for an adverse reaction, like a headache, Yahoo News reports.

Neha Patkak, MD, who’s board-certified in internal medicine, told POPSUGAR that she has seen cases on both sides of the spectrum – melatonin causing headaches, and melatonin possibly helping to alleviate a headache. Billy Yung, MD, a neurologist at Westmed Medical Group in Purchase, NY, cited a 2016 study that showed melatonin may actually help prevent migraines. Dr. Patkak pointed out, though, that “researchers are still trying to figure out how melatonin helps in these situations as well as the best doses.”

“Another thought is that because melatonin is connected to our circadian rhythm, the timing of when you take it could interfere with your sleep cycle, which may cause headaches,” Dr. Patkak told POPSUGAR. Getting too little or too much sleep, or falling out of a consistent sleep pattern, are known triggers of migraines and other headaches.

Get the full story at yahoo.com.