People who have trouble sleeping are caught in a terrible double bind. On the one hand, they are told that sleep is essential for good health. Without it, people are prone to obesity, hypertension, diabetes, depression and cognitive difficulties. On the other hand, if they decide to use sleeping pills, there are other serious risks to consider.

In the early 20th century, the only sleeping pills available were barbiturates like amobarbital (Amytal), pentobarbital (Nembutal) and secobarbital (Seconal). The trouble with such drugs was that overdoses were lethal. Combining a barbiturate with booze was even more deadly. Marilyn Monroe and Judy Garland were among the victims of barbiturate overdose.

When benzodiazepines appeared in the early 1960s, they became incredibly popular. Starting with chlordiazepoxide (Librium) and diazepam (Valium), these drugs were hailed as safer sleeping pills and sedatives. Overdoses were far less likely to lead to death. By 1966, such medicines were immortalized by the Rolling Stones in their song “Mother’s Little Helper.”

To this day, drugs such as alprazolam (Xanax), clonazepam (Klonopin) and lorazepam (Ativan) are prescribed in huge numbers to treat anxiety and insomnia.

The downside of both barbiturates and benzodiazepines is that it can be hard to stop taking them. The body adapts and rebels when the drugs are suddenly discontinued. Withdrawal symptoms of benzos include anxiety and agitation, irritability, impaired concentration, panic, insomnia, depression, muscle twitching, sweating and seizures.

When the “Z-drugs” were introduced, they, too, seemed like an advance for insomniacs. Drugs such as zolpidem (Ambien), zaleplon (Sonata) and eszopiclone (Lunesta) were perceived as more effective and less likely to cause dependence than benzodiazepines.

In recent years, however, evidence has mounted that both benzos and Z-drugs have unexpected side effects, especially in older people. A long-term French study published in 2012 showed a 50 percent increase in the risk of dementia among people over 65 who used a benzodiazepine to help with sleep (BMJ online, Sept. 27, 2012).

We also worry about the increased likelihood of a fall among older users of any sleep medications, including the Z-drugs. Falls among older people can result in life-threatening fractures.

Researchers from the Centers for Disease Control and Prevention and Johns Hopkins Bloomberg School of Public Health found that such “psychiatric medications” were implicated in many emergency department visits (JAMA Psychiatry online, July 9, 2014). Zolpidem stood out as the drug behind 20 percent of ER visits among older adults.

Not only older people, but those of any age may be affected by zolpidem the morning after. That’s why the Food and Drug Administration reduced the dose of zolpidem for women from 10 mg to 5 mg last year. It’s difficult for drivers to evaluate impairment caused by such medications.

How much benefit do people get from sleeping pills? Dartmouth Drs. Lisa Schwartz and Steven Woloshin point out that Lunesta helps people fall asleep 15 minutes faster and stay asleep 37 minutes longer than placebo.

So what other options are available? Cognitive behavioral therapy can be effective against insomnia. Vigorous exercise during the day, a high-carb snack in the evening or a hot bath an hour before bed may help people fall asleep more quickly.