Lunesta, the brand name for eszopiclone, is a prescription medication primarily used to treat insomnia. The 3 mg dosage is commonly prescribed to help individuals fall asleep more quickly and stay asleep longer. Lunesta works by enhancing the activity of a neurotransmitter in the brain called gamma-aminobutyric acid (GABA), which promotes relaxation and sleepiness.