What Medication Helps With Sleep and Anxiety?

Several types of medication can treat both sleep problems and anxiety at the same time, and many prescribers specifically choose drugs that target both issues with a single prescription. The most common options fall into a few categories: sedating antidepressants, standard antidepressants paired with a sleep aid, antihistamines, and in some cases low-dose antipsychotics or blood pressure medications. Which one fits best depends on whether your sleep trouble or your anxiety is the bigger problem, and whether the two are feeding each other.

Why Sleep and Anxiety Often Need the Same Treatment

Insomnia frequently starts with a stressful event, like work pressure, illness, or loss. For most people, sleep returns to normal once the stress passes. But when it doesn’t, the main factor that keeps insomnia going is anxiety about sleep itself. You lie awake worrying about not sleeping, which makes you more anxious, which keeps you awake longer. This cycle means that treating the anxiety often fixes the sleep, and improving sleep often reduces the anxiety.

Because these two problems are so tightly linked, the clinical consensus is to select medications that target both sleep and the underlying condition rather than treating each one separately.

Trazodone: The Most Commonly Prescribed Option

Trazodone is technically an antidepressant, but its off-label use for insomnia has actually surpassed its use for depression. At low doses (25 to 100 mg at bedtime), it blocks brain receptors involved in wakefulness and produces a sedating effect without the full antidepressant action. At higher doses (150 to 600 mg), it also works as an antidepressant and can address mood and anxiety symptoms more directly.

A systematic review of 45 studies found that 95.5% concluded trazodone was effective for treating insomnia. It has also shown benefits for people whose sleep problems are tied to PTSD and mood disorders. For someone dealing with mild to moderate anxiety and trouble sleeping, a low dose at bedtime is one of the most straightforward starting points. Side effects tend to be mild at lower doses, though some people experience grogginess the next morning or dry mouth.

Mirtazapine for Anxiety-Driven Insomnia

Mirtazapine is another antidepressant that produces significant drowsiness, especially at lower doses. It increases the amount of deep, restorative sleep you get each night and improves sleep continuity, meaning fewer awakenings. A placebo-controlled study in healthy volunteers found that a single 30 mg dose improved both sleep efficiency and the duration of slow-wave sleep, the deepest stage of the sleep cycle.

Where mirtazapine stands out is in anxious patients. It leads to rapid and sustained improvement in depressive symptoms and is particularly effective in people with significant anxiety. In one study of PTSD patients, 78.6% responded to mirtazapine compared to just 16.7% on placebo. However, it was not effective for social anxiety disorder in a separate trial, so the type of anxiety matters. The most notable side effect is weight gain, which can be significant and is a common reason people stop taking it.

SSRIs and SNRIs: Treating the Root Cause

Standard antidepressants like sertraline, escitalopram, paroxetine, venlafaxine, and duloxetine are first-line treatments for most anxiety disorders. They don’t produce immediate sedation the way trazodone or mirtazapine do. In fact, some of them can initially make sleep worse during the first few weeks. But once they take full effect, typically after four to six weeks, the reduction in anxiety often allows sleep to normalize on its own.

For this reason, prescribers sometimes pair an SSRI or SNRI with a short-term sleep aid during the initial weeks. This could be a low dose of trazodone at bedtime alongside a morning SSRI, for example. Once the antidepressant is working and anxiety levels drop, the sleep medication can often be tapered off. The other approach is to skip the separate sleep aid entirely and choose a sedating antidepressant like mirtazapine or trazodone as the primary treatment, handling both problems with one medication from the start.

Hydroxyzine: An Antihistamine Alternative

Hydroxyzine is a prescription antihistamine that blocks the same brain receptor responsible for wakefulness. It’s FDA-approved for anxiety and commonly prescribed at 25 to 100 mg at bedtime for sleep. Unlike over-the-counter sleep antihistamines like diphenhydramine (Benadryl), hydroxyzine has a shorter duration of action, which means less next-day grogginess. It also causes fewer anticholinergic side effects like dry mouth and constipation.

There’s no evidence that people develop tolerance to antihistamine sleep aids, which is an advantage over some other options. The main concern is a potential effect on heart rhythm (QTc prolongation), particularly if you’re taking other medications that carry the same risk or if you have existing heart conditions. The evidence supporting hydroxyzine specifically for insomnia is limited compared to trazodone or mirtazapine, but it remains a common choice when a non-addictive, fast-acting option is needed for both anxiety and sleep.

Low-Dose Doxepin for Sleep Maintenance

Doxepin is an older antidepressant that, at very low doses of 3 to 6 mg, is FDA-approved specifically for difficulty staying asleep. At these doses it works primarily as a histamine blocker rather than an antidepressant. At higher doses it treats depression and anxiety. Common side effects include dizziness, dry mouth, blurred vision, and constipation. It’s a narrow option, best suited for people whose main complaint is waking up in the middle of the night or too early in the morning, with anxiety playing a secondary role.

Prazosin for Nightmares and PTSD-Related Sleep Problems

If anxiety-related nightmares are the specific reason you can’t sleep, prazosin is worth knowing about. Originally a blood pressure medication, it blocks the adrenaline surge that drives vivid, distressing dreams. Dosing typically starts at 1 mg at bedtime and increases gradually. Effective doses range widely, from around 2 mg in older adults to over 13 mg in combat veterans.

The results in PTSD patients are striking. In one study, 8 out of 9 participants had more than a 50% reduction in nightmares. In several others, 78% of patients improved, and in two patients nightmares were completely eliminated. A comparison study found prazosin outperformed low-dose quetiapine for long-term nightmare control. Side effects are mostly related to blood pressure drops, including dizziness when standing up quickly, so the slow dose increase is important.

Why Benzodiazepines Are Less Favored Now

Benzodiazepines like lorazepam, clonazepam, and alprazolam work fast for both anxiety and sleep. They remain widely prescribed, but the trend in clinical practice has shifted away from them for long-term use. The core issue is physical dependence. Your body adapts to them relatively quickly, requiring higher doses for the same effect, and stopping them abruptly can cause withdrawal symptoms that mirror the original problems: rebound insomnia, restlessness, anxiety, shivering, and dizziness.

Experts recommend a taper period of two to four months when discontinuing these medications, done gradually under medical supervision. For short-term crises, a few weeks of a benzodiazepine while waiting for an SSRI to take effect can be reasonable. But as a long-term solution for ongoing sleep and anxiety problems, the options above generally carry fewer risks.

Low-Dose Quetiapine: Common but Controversial

Quetiapine is an antipsychotic that, at low doses of 25 to 200 mg, is frequently prescribed off-label for insomnia and anxiety. It’s sedating and can reduce racing thoughts at night. However, the safety profile raises concerns. Even at low doses, retrospective studies found significant weight gain compared to baseline. At standard antipsychotic doses (150 to 800 mg), quetiapine is associated with diabetes, obesity, and high cholesterol. Case reports at lower doses have identified serious adverse events including liver damage and restless legs syndrome. The short-term studies showed only minor side effects like drowsiness and dry mouth, but they were small and brief. Given the alternatives available, quetiapine is generally reserved for situations where other medications haven’t worked.

What to Expect When Starting Treatment

Sedating medications like trazodone, mirtazapine, and hydroxyzine typically improve sleep within the first few nights. Anxiety relief from these drugs, if it comes, develops over one to several weeks. SSRIs and SNRIs work on a longer timeline: anxiety symptoms generally begin improving after two to four weeks, with full effects building over six to eight weeks. Sleep may get worse before it gets better with these medications.

If you eventually stop taking a sleep or anxiety medication, a gradual taper is almost always preferable to stopping suddenly. Even medications that aren’t considered addictive can cause rebound insomnia or a temporary spike in anxiety when discontinued abruptly. The typical recommendation is to reduce the dose stepwise over two to four months, though shorter tapers are sometimes appropriate for medications you’ve only taken briefly.