Drug makers have since slashed ad spending in response to competition from lower-cost, generic versions of Ambien, 50% in 2008 alone, but the demand for sleep help continues to rise. Those cheaper pills are now driving most of the prescription growth.

The Z drugs reduce the average time it takes to fall asleep by 18 minutes and increase total sleep time by 28 minutes compared with a placebo, according to a National Institutes of Health-funded analysis published in 2005. Some sleep specialists believe the improvement is minimal, but other sleep experts contend the extra sleep makes a difference when accumulated over several nights.

Rozerem was approved in 2005 and not included in the analysis, which was performed by the Agency for Healthcare Research and Quality. The agency noted it used published studies to get its results, so the real-world performance of the drugs may be worse.

Get developments in medicine, nutrition and fitness delivered to your inbox with our The Health Report newsletter. Sign up »

Researchers are continuing to search for better insomnia drugs. Swiss drug maker Actelion is conducting a late-stage clinical trial of almorexant, a drug that blocks the activity of a peptide called orexin, which is believed to have a role in wakefulness. In a previous study, 147 subjects taking almorexant fell asleep 18 minutes faster -- no better than what is seen with existing pills. But researchers found no association between almorexant and "next day" effects.

Side effects

Sleep specialists say the pills can be useful to help break a cycle of sleeplessness, or to overcome jet lag. But some doctors are concerned that the heavy prescribing contributes to a false impression that the medications are perfectly safe. In fact, many sleep medications can cause what doctors call a "next-day effect" - a pill-induced drowsiness that spills into the next day.

The Food and Drug Administration two years ago required strong warnings on 13 sleep medications, including Ambien and Lunesta, because rare but bizarre behaviors have been linked to the pills, including cases of sleep-walking, sleep-driving and sleep-eating. Some people have set small fires while trying to cook, their minds in a fog induced by sleeping pills. In the morning, they don't remember the incidents.

Researchers aren't sure why the pills cause odd reactions. One theory has it that the people reporting bizarre behaviors are neither fully asleep nor awake. They have no memory of their nocturnal forays because the pills can have a mild amnesiac effect, blocking the formation of memories.

In January, a 51-year-old Wisconsin electrician was found frozen to death after sleep-walking outdoors in subzero temperatures. Sawyer County coroner Dr. John Ryan said the man had been drinking and the sleep aid Ambien was detected in his bloodstream. Alcohol is known to increase the risk of side effects from sleeping pills, he noted.

"It's my strong suspicion that's what did it," Ryan said.

Drug makers say patient safety is a priority and the labels on their products display information about side effects, including advice to avoid alcohol when taking the pills.

Dr. Michael Thorpy, a sleep specialist at Montefiore Medical Center in New York and a consultant who commented at the request of Ambien maker Sanofi-Aventis, said strange sleep behaviors can occur naturally and it's wrong to blame the pills in all cases. Some complaints of memory loss might be due to sleep, which also has an amnesiac effect; it's one reason why people forget waking in the middle of the night, he said.

But the risk of side effects and dependence isn't the only potential downside to a prescription for sleep medications.

Dr. David Fassler, a clinical professor of psychiatry at the University of Vermont, said some doctors may be prescribing medications instead of treating the underlying cause of sleeplessness, such as depression or anxiety.

"Trouble sleeping can be a sign of multiple disorders," he said in an e-mail. "It can also be a response to stress or conflict at home, in school or at work. People need a careful assessment to figure out that's actually going on. Effective and appropriate treatment really depends on an accurate diagnosis."

Younger pill takers

Of particular concern to some sleep specialists is the age at which people are turning to sleeping pills.

Adults under age 45 are fast replacing the elderly as the prime market for sleeping pills, according to the research firm Thomson Reuters. The most dramatic growth was seen among college-age adults, whose use of prescription sleep aids nearly tripled to 1,524 users per 100,000 in 2006 from 599 users per 100,000 in 1998.

"If they start to depend on sleeping pills in their late teens and early 20s, they are setting themselves up for a pattern of sleeping pill use," said Jacobs of the University of Massachusetts Medical Center's sleep clinic. Like many sleep specialists, he recommends patients first try behavioral therapy to help them overcome the negative thoughts keeping them awake. Jacobs also has a company that markets a drug-free insomnia treatment program.

Many college students probably use the pills to manage sleep habits that are often out of sync with class schedules.

"Going to bed at 3 in the morning and sleeping until noon on weekends is not unreasonable at that age," said researcher James K. Walsh, a spokesman for the National Sleep Foundation, who manages the sleep clinic at St. Luke's Hospital in St. Louis. Students with an early-morning class might use medications to help them get to bed earlier the night before, he said.

But college students are not immune to the economic stresses that are taking a toll on older adults. Scripps College sophomore Jane Logenbaugh Sherwood said she takes a pill to lull her to sleep when worries about her career prospects keep her awake. "I'm in college so I can go out into the world and find a job," she said. "I'm stressed out about the rest of my life."