Lunesta is a sedative, also called a hypnotic. It affects chemicals in your brain that may become unbalanced and cause sleep problems or insomnia. Lunesta is used to treat insomnia. This medication causes relaxation to help you fall asleep and stay asleep. Patients can lower the cost of Lunesta medication through patient assistance programs. See here for more information.