Melatonin is a kind of endogenous substance,which can regulate circadian rhythm and sleep quality by activating melatonin receptors MT1 and MT2.Based on the above effect,MT1 and MT2 are potential therapeutic targets for the disorders ranging from insomnia to circadian sleep disorders.The mechanism of melatonin and the advances in research on melatonin receptor agonists for treating insomnia are introduced in this paper.The structure-activity relationships(SARs) of melatonin receptor agonists are also discussed.