For trouble falling asleep: 0.3 to 5 mg of melatonin daily for up to 9 months has been used. For sleeping problems in people with sleep-wake cycle disturbances: 2 mg to 12 mg taken at bedtime for up to 4 weeks has been used.