I am taking melatonin every day in dose from 1 to 6 mg ( usually 3mg ) for almost 4-5 years.
It helps me sleep better. The highest dose that I have tried was 9 mg. The only effect I noticed from this dose was good night sleep.
On a few occasions, I noticed that when I took the regular dose of melatonin of 3 mg that I can't fall asleep at all. I feel so fresh the whole night. It happens only a few times in all these years that I am taking melatonin.
When that happens I stop taking melatonin for a few days and then I restart taking melatonin again. This insomnia goes the next day when I stop melatonin.
I found one good and long article about melatonin
www.ncbi.nlm.nih.gov
and here what is says about mega doses
Probably timing is also very important
It helps me sleep better. The highest dose that I have tried was 9 mg. The only effect I noticed from this dose was good night sleep.
On a few occasions, I noticed that when I took the regular dose of melatonin of 3 mg that I can't fall asleep at all. I feel so fresh the whole night. It happens only a few times in all these years that I am taking melatonin.
When that happens I stop taking melatonin for a few days and then I restart taking melatonin again. This insomnia goes the next day when I stop melatonin.
I found one good and long article about melatonin
The Therapeutic Potential of Melatonin: A Review of the Science - PMC

and here what is says about mega doses
The acute toxicity of melatonin as seen in both animal and human studies is extremely low. Melatonin may cause minor adverse effects, such as headache, insomnia, rash, upset stomach, and nightmares. In animals, an LD50 (lethal dose for 50% of the subjects) could not be established. Even 800 mg/kg bodyweight (high dose) was not lethal.[138] Studies of human subjects given varying doses of melatonin (1–6.6 g/day) for 30–45 days, and followed with an elaborate battery of biochemical tests to detect potential toxicity, have concluded that, aside from drowsiness, all findings were normal at the end of the test period
Probably timing is also very important
Although melatonin is a potential adjunctive agent in the treatment of cancer and immune deficiency, poorly timed administration can produce opposite effects. Melatonin injections given in the morning stimulate tumor growth,[46,148] whereas the same doses in midafternoon have no effect but in the evening have a retarding effect. And although some people with depression may suffer from a “low melatonin syndrome,”[27] melatonin administration that unduly prolongs the nocturnal melatonin rise, or that is given throughout the day, may exacerbate SAD[82] and bipolar and classic depression.[83] Finally, animal studies have shown that moderately large doses of melatonin (equivalent in one study to about 30 mg in adult humans) increased light-induced damage to retinal photoreceptors
Melatonin has also been suggested for use as a contraceptive for women,[145] which might raise the question of whether melatonin damages the female reproductive system. Notably, no side effects were reported in a report of a phase 2 clinical trial in which 1400 women were treated with 75 mg of melatonin nightly for 4 years.[145]