Melatonin is used for short-term treatment of insomnia (difficulty sleeping).
It may also be used for other conditions. Check with your healthcare professional if you are unsure why you are given this medication.