Melatonin is naturally found in the brain. It is a sleep-hormone secreted by the pineal gland. Those used as medicine are often made synthetically inside a laboratory. They are either used to help someone to sleep, or help blind people establish day-night cycle.
Melatonin is used to adjust the body's internal clock. It regulates the circadian rhythm. That is why, melatonin supplements are frequently taken in to fix sleep disorders. They are used as aids for cluster headache, insomnia, jet lag, and shift-work sleep disorder.
Melatonin supplements are typically regarded safer for short-term use and must be within the recommended dose. They are available at most drugstores and pharmacies. There may be some places where they can be bought over-the-counter, while others are government-regulated.