Melatonin
Prescription status is set country by country — the label where you live is the one that applies.
Beta: the medication section is still being tested, and its data may contain errors. Do not rely on it for a decision about your own treatment.
Melatonin is the hormone the pineal gland releases as evening light fades, and it acts on receptors in the brain that set the timing of the sleep–wake cycle. Taken as a tablet it signals the body clock that night has begun rather than sedating in the way a sleeping pill does. It is used for insomnia and general sleep support, though the route to it differs: an off-the-shelf supplement in the United States, a pharmacy-only product in Sweden and Indonesia, and in the United Kingdom and Japan a licensed medicine, dispensed on prescription and not sold as a supplement.
A usual adult range, not a national label — the dose and the timing differ by country and by product.
Approved uses differ by country — some of these may be off-label or unapproved where you live.
It is taken close to bedtime, since its effect depends on when it is taken as much as on how much. Bright screens and room light afterwards work directly against it, so keeping the lights low preserves the signal. It can leave drowsiness or slowed reactions, which matters for driving or operating machinery that evening and the following morning. It is intended for short courses rather than indefinite nightly use.
Insomnia that persists after a short course, or that comes with daytime exhaustion, low mood or breathing pauses during sleep, is worth seeing a doctor about instead of continuing on one's own.
Reference information, not medical advice. Discuss any change with your doctor.