Lunesta, known by its generic name eszopiclone, is a prescription medication primarily used to treat insomnia, a sleep disorder characterized by difficulty falling asleep or staying asleep. Lunesta is a non-benzodiazepine sedative-hypnotic that acts on the central nervous system by enhancing the effect of gamma-aminobutyric acid (GABA), a neurotransmitter that inhibits brain activity. This results in a calming effect, promoting sleep.