Eszopiclone is used to treat insomnia (difficulty falling asleep or staying asleep). Eszopiclone is in a class of medications called hypnotics. It works by slowing activity in the brain to allow sleep.
Source: U.S National Library of Medicine (MedlinePlus)