Which medication for insomnia has the least side effects

The current clinical use of sleeping drugs for the treatment of insomnia is divided into several categories, the first is barbiturates, the second is benzodiazepines, the third is a new type of non-benzodiazepine hypnotic drugs, in addition to anti-anxiety drugs, antidepressants, melatonin, Chinese medicinal preparations. The side effects of melatonin are relatively small among all the drugs, because it is a secretion of the human or mammalian pineal gland and has a significant effect on improving sleep. However, the use of large amounts or long-term application can lead to dependence, and there can be central nervous system or endocrine changes.