GlaxoSmithKline (NYSE:GSK) isn't adding a division of lepidoptera, but yesterday it did buy some really expensive glowing green butterflies.

Glaxo inked a deal with Sepracor (NASDAQ:SEPR) to market the company's sleep aid Lunesta outside North America and Japan. The drug will be called Lunivia in Europe.

Sepracor will receive $20 million up front and could get up to $155 million if all the milestones, like regulatory approvals, are met. When the drug is brought to market, Glaxo will pay Sepracor double-digit royalties that will escalate as product sales increase, as well as compensation for supplying the drug.

The drug is now under review in the EU where Sepracor expects to receive an approval in the second half of 2008. The market in Europe for sleep aids last year was about $500 million, but only about a quarter of insomnia suffers are on medication, so there's certainly room for the market to grow.

If Glaxo can break into that untapped market, the deal would be a shot in the arm financially for the beleaguered drugmaker. Sales of Lunesta increased a pitiful 2.7% year over year last quarter and have been relatively flat for almost two years now. Sales of the drug have slowed in the U.S. because patients switched from Lunesta to recently released generic versions of Sanofi-Aventis' (NYSE:SNY) Ambien.

Partnering with a big pharmaceutical company for sales outside the U.S. is certainly a good move for Sepracor. It doesn't have the structure to negotiate pricing in countries with nationalized health care, set up worldwide distribution, or manage sales forces in countries around the world. Now, hopefully, it can put those royalty checks to good use developing its pipeline.

Having trouble sleeping? Here's some more Foolishness to help pass the time:

Want to know the latest drug stock we've picked for the Fool's market-beating Rule Breakers newsletter? Click here to take a look at all our recommendations and to get a free 30-day trial.

Fool contributor Brian Orelli, Ph.D., doesn't own shares of any company mentioned in this article. Glaxo is a selection of the Motley Fool Income Investor newsletter. The Fool's disclosure policy hasn't slept in weeks; it's too busy making sure you are protected.