Lunesta is the brand name of a drug called eszopiclone indicated for insomnia. One of its quite common side effects is unpleasant taste that goes away in a day or two. The bitter taste is far more with 3 mg tablet compared to 2 mg tablet. Lunesta should always be taken with a full glass of water and never chewed or crushed. It is not clear as to the dose taken by you and whether you took it with a full glass of water.
In any case the side effect will soon disappear.