Part of the potential danger is lousy control over the actual amount in the dose.
"Results show that melatonin content...with the actual content ranging from 83 percent less to 478 percent more than the concentration declared on the label."
https://aasm.org/study-finds-that-melatonin-content-of-suppl...