I don't think it is a myth.
I worked at a pharmacy for years before moving overseas. I'm not a pharmacist, but overheard pharmacist-customer advice for melatonin many times. While melatonin is one of the safer sleep aids, the pharmacists would always warn to take the lowest dose possible, and only take it while needed without a doctor's oversight because of the threat of decreasing natural melatonin production. It causes a sort of dependency on the supplement. It always seemed occasional use was OK, and generally safer than some of the alternatives.
I think these risks are why the supplement is a prescription here (Norway), and I fully agree with this.
It can still be better than the dependency on other sleep aids and have fewer side effects, though.