Melatonin has been shown to improve insomnia, but there are clear indications. Insomnia is a final outcome caused by a variety of complex factors, including alterations in various physiological, psychological and environmental factors, as well as medications, neuropsychiatric and somatic disorders. Common causes include family genetic factors, stress and life events, lifestyle problems, self-characteristic personality, previous illnesses taking certain specific medications, and advanced age in women. To treat insomnia, we should first prevent and correct poor sleep behaviors and perceptions, and deal with the triggers of insomnia, supplemented by medication if necessary. Melatonin, an amine hormone secreted by the pineal gland, plays a key role in the body to maintain circadian rhythm, induces natural sleep, and has a great role in immune regulation, anti-aging and anti-tumor. It is an endogenous substance that acts through the regulation of the endocrine system and has its own metabolic pathway in the body, which is currently classified as a health food area at home and abroad. The ideal hypnotic effect can be achieved by taking smaller doses of melatonin, but only for patients with insufficient secretion. Therefore, melatonin can be used to improve sleep, remove blemishes and whiten skin, anti-aging, and regulate immunity, etc. Using normal doses will not cause significant damage to the body, but it is a hormone after all, and overdosing may play a negative feedback effect, thus inhibiting the secretion of gonadotropins. Melatonin has side effects and contraindications, such as daytime sleepiness, headache, dizziness, mild anxiety, irritability, etc. Therefore, it is important to follow the principle of taking the drug as needed. Therefore, for patients with circadian rhythm disorders and insomnia with difficulty falling asleep as the main complaint, melatonin has some therapeutic effect, but care should be taken not to abuse it to avoid adverse reactions.