Not all sleeping pills are created equal, and not all of them work for every type of sleep problem. That’s why the American Academy of Sleep Medicine has released a first-of-its-kind set of guidelines for doctors on how to prescribe—or not prescribe—14 different medications and supplements for the treatment of chronic insomnia in adults.

About 10% of people meet the criteria for chronic insomnia, which lasts at least three months and occurs at least three times a week. The new guidelines suggest that certain medications may be helpful in addition to talk therapy, which should continue to be a first line of treatment for people struggling with ongoing sleep issues.

Some drugs, for example, should be prescribed to those who have trouble falling asleep (sleep onset insomnia). These include zaleplon (Sonata), triazolam (Halcion), and ramelteon (Rozerem), the new report states.

Other drugs are recommended for treating people who have trouble staying asleep throughout the night, classified as sleep maintenance insomnia. These include suvorexant (Belsomra) and doxepin (Silenor, Zonalon, and Prudoxin).

A few medications were given the green light for both types of insomnia: Eszopiclone (Lunesta), zolpidem (Ambien, Edluar, Intermezzo, and Zolpimist), and temazepam (Restoril) are suggested for either sleep onset or sleep maintenance problems.

RELATED: The 11 Kinds of Insomnia

The difference in recommendations is largely because some drugs last longer in the body than others, says lead author Michael J. Sateia, MD, Professor Emeritus of psychiatry and sleep medicine at The Geisel School of Medicine at Dartmouth. “It’s a reminder to clinicians that it’s important to choose an agent that has an appropriate duration of action for the particular type of insomnia you’re treating,” he says.

Dr. Sateia points out that these recommendations are only for long-term cases of insomnia. “What we’ve laid out here does not necessarily apply to the very common occasional night or a few intermittent nights of poor sleep,” he says.

He also stresses that the recommendations are based on the best available data from clinical trials, and aren’t meant to be the final word on whether a doctor prescribes them. Because the evidence behind them is less than certain (and often funded by drug companies, as most pharmaceutical studies are), each recommendation is classified as “weak.”

“People shouldn’t interpret that as meaning that these drugs have a weak effect or that they don’t work very well,” Dr. Sateia says. “Rather, it’s just an indication of the robustness and quality of the data we have at hand.”

Drugs that weren’t recommended for either type of chronic insomnia include diphenhydramine (the active ingredient in Benadryl, Nytol, and Unisom), trazodone (an antidepressant), or tiagabine (an anticonvulsant). Diphenhydramine products are commonly purchased over-the-counter to treat sleep problems, and trazodone and tiagabine are often prescribed off-label.

Trazodone in particular has become a popular choice with doctors, says Dr. Sateia, because of concerns that people could become addicted to or develop a tolerance for standard sleep medicines. “But it’s not clear that trazodone is necessarily any safer,” he says, “and the data for treating primary insomnia is extremely thin.”

The three dietary supplements included in the guidelines—melatonin, tryptophan, and valerian—are also not suggested for treating chronic insomnia. There are relatively few studies in this area, says Dr. Sateia, and the fact that supplements aren’t regulated as strictly as drugs also make them difficult to recommend. Just this week, in fact, a Canadian study found that the melatonin content of supplements can vary widely from what’s listed on the label.

To get our best wellness advice delivered to you inbox, sign up for the Healthy Living Newsletter

The guidelines, which were published yesterday in the Journal of Clinical Sleep Medicine, do not recommend using one drug over another, since few studies have compared medications head-to-head.

They do, however, emphasize that medications for chronic insomnia should only be considered after patients have tried cognitive behavioral therapy (CBT), or if they’re unable to participate in CBT. Also known as talk therapy, CBT is considered the best long-term treatment for insomnia.

“We know the effectiveness of medications tends to wear off when the medication has stopped, whereas the efficacy of CBT persists over time, even after therapy is discontinued,” Dr. Sateia says.

RELATED: 11 Signs You're Sleep Deprived

Before being prescribed a sleep aid, patients should also be carefully evaluated to determine if any underlying disorders—such as depression—are contributing to their insomnia, says Dr. Sateia.

Ultimately, the decision on what sleep aid you use, if any, should take into account factors such as medication costs, side effects, your symptoms, and your health history, the report states.

“These guidelines are intended to present to clinicians what the data currently says and doesn’t say,” he says, “but it really should come down to a personal decision between the prescriber and the patient.”