Direct Answer

Many widely used medications can affect attention, memory, and processing speed — sometimes obviously, often subtly, and occasionally for years after a drug is started. The most consistently flagged groups are strong anticholinergics, benzodiazepines and related sleep aids, opioids, some antiepileptics and antipsychotics, and certain chemotherapy regimens. Most of these effects are dose-related and reversible when the drug is adjusted, but cumulative exposure over time has been linked to higher dementia risk in observational studies, which is why thoughtful prescribing, periodic medication reviews, and honest conversations with a clinician matter.

Why It Matters

Most adults are on at least one prescription drug, and a meaningful share are on five or more. A CDC National Center for Health Statistics analysis found that nearly 7 in 10 U.S. adults aged 40–79 used at least one prescription drug in the past month, and about 22% used five or more — the threshold researchers often use to define polypharmacy. As people get older and accumulate diagnoses, the math gets harder: each added drug raises the odds of side effects, interactions, and unintended cognitive effects.

The brain is also more sensitive to many medications with age. The blood–brain barrier becomes more permeable, drug metabolism slows, and the same dose can produce a stronger effect than it did at 40. That is part of why the American Geriatrics Society maintains the AGS Beers Criteria, a regularly updated list of medications that are generally considered potentially inappropriate for adults 65 and older — many of them flagged precisely because of effects on attention, memory, balance, or delirium risk.

None of this means medications are inherently bad for the brain. Many treat conditions that themselves harm cognition — uncontrolled high blood pressure, severe depression, untreated sleep apnea, chronic pain. The goal is not "fewer pills" but the right pills, at the right dose, for the right amount of time.

Key Facts at a Glance

  • Strong anticholinergics (some over-the-counter sleep and allergy drugs, bladder medicines, tricyclic antidepressants) have been associated with higher long-term dementia risk in large observational studies.
  • Benzodiazepines and Z-drugs (zolpidem, eszopiclone) can cause sedation, memory gaps, and falls — and the FDA strengthened the boxed warning for benzodiazepines in 2020 to cover misuse, dependence, and withdrawal.
  • Opioids can cause drowsiness, slowed thinking, and confusion, especially at higher doses or when combined with sedating drugs.
  • Some chemotherapies, brain radiation, and immunotherapies are linked to "chemo brain" — a real, often persistent change in concentration and memory.
  • Statins are widely discussed because of memory-related anecdotes, but randomized-trial evidence has not shown a measurable cognitive difference between statins and placebo in adults at vascular risk.
  • Anesthesia and surgery can be followed by postoperative cognitive dysfunction, especially in older adults and after major procedures.
  • Polypharmacy itself — being on many drugs at once — is an independent risk factor for confusion, falls, and hospitalization in older adults.

How Medications Can Affect the Brain

There is no single mechanism. Different drug classes affect cognition in different ways, and the same drug can affect different people very differently.

The most common patterns include:

  • Sedation and slowed processing. Sleep aids, benzodiazepines, opioids, some antihistamines, and certain antiepileptics directly slow brain activity, which can blur attention and short-term memory.
  • Anticholinergic blockade. Many older antihistamines (diphenhydramine), bladder medicines (oxybutynin), tricyclic antidepressants, and motion-sickness drugs block acetylcholine — a neurotransmitter critical for memory and attention. In a large nested case-control study, Coupland and colleagues found that cumulative anticholinergic exposure over 10 years was associated with about a 49% higher odds of dementia in the highest exposure tier, with antidepressants, antipsychotics, antiparkinson drugs, bladder antimuscarinics, and antiepileptics carrying the strongest signals.
  • Delirium. Some medications — opioids, benzodiazepines, anticholinergics, and certain antibiotics in vulnerable people — can trigger acute confusion, especially during illness or hospitalization.
  • Mood and motivation. Drugs that flatten mood or motivation (some beta blockers, certain hormonal therapies, opioids) can look like cognitive decline from the outside even when memory itself is intact.
  • Withdrawal effects. Stopping benzodiazepines, opioids, or some antidepressants too quickly can produce its own cognitive symptoms — confusion, agitation, poor sleep — that recover gradually with a clinician-guided taper.

It is worth saying explicitly: cognitive side effects are not weakness or imagination. They are a real pharmacological phenomenon, and they deserve to be named, documented, and discussed with the prescriber.

Drug Classes Worth Knowing About

This is not a list of drugs to avoid. It is a list of categories where cognitive effects are well-documented enough that an open conversation with a clinician is reasonable, especially in middle age and beyond — see our focused guide on medications that can cause memory loss.

Anticholinergics

Anticholinergic medications block acetylcholine across the body. Some are obvious (older antihistamines for sleep or allergy, bladder antispasmodics, certain antidepressants); some are less so (some Parkinson's drugs, antipsychotics, motion-sickness medicines). The Cochrane review on anticholinergic deprescribing cautiously concludes that while observational evidence links anticholinergic burden to cognitive risk, randomized trials of deprescribing are still limited and short — meaning the population signal is clearer than the individual prescribing rule. A pharmacist or geriatrician can score your anticholinergic burden using validated tools. Our dedicated guide to anticholinergic drugs and dementia risk walks through the strongest evidence class by class.

Benzodiazepines and Z-drugs

Diazepam, lorazepam, alprazolam, clonazepam, zolpidem, eszopiclone, and similar drugs are effective short-term for anxiety, panic, and insomnia, but long-term use is consistently associated with sedation, memory gaps, falls, and dependence. The FDA's 2020 boxed warning update emphasizes the risks of misuse, physical dependence, and withdrawal. For a deeper look at the trade-offs with anti-anxiety medication specifically, see our guide to how anxiety medications can affect memory.

Opioids

Prescription opioids can cause sedation, slowed processing, and constipation that itself worsens cognition. The risk goes up sharply when opioids are combined with benzodiazepines, sleep aids, or alcohol. The cognitive effect is usually proportional to dose and most prominent in the first weeks of use or after a dose increase.

Antidepressants and antipsychotics

Most modern antidepressants (SSRIs, SNRIs) have a relatively favorable cognitive profile, and treating depression itself often improves thinking — see our guide on how depression can affect memory. Tricyclic antidepressants and some antipsychotics carry more anticholinergic and sedating effects, especially in older adults. The Beers Criteria flags several of these as potentially inappropriate in adults 65+.

Antiepileptics and mood stabilizers

Drugs like topiramate, phenytoin, and older valproate formulations can affect word-finding, processing speed, and attention in some people. Newer agents are generally better tolerated, but individual response varies.

Chemotherapies, immunotherapies, and brain radiation

"Chemo brain" is a real, increasingly studied phenomenon. The National Cancer Institute notes that chemotherapy, brain radiation, and some immunotherapies can each contribute to memory and concentration problems, often layered on top of fatigue, anxiety, depression, sleep disruption, and the cancer itself. Our deeper guide to chemo brain and the cognitive effects of cancer treatment walks through the evidence.

Anesthesia and post-operative cognitive change

After major surgery — especially cardiac, orthopedic, or long abdominal procedures — some patients experience postoperative cognitive dysfunction (POCD): a drop in memory, attention, or executive function that can last weeks or months. A 2022 review in Therapeutic Advances in Neurological Disorders reports POCD in roughly 10–54% of patients in the first weeks after surgery, falling to roughly 12–17% at three months and a small minority at twelve months. The strongest risk factors are older age, prior cognitive impairment, and longer or more complex surgery — not, the evidence suggests, the specific anesthetic agent.

Statins

Statins are one of the most-asked-about drug classes because of widely shared memory-loss anecdotes. A 2016 Cochrane review of randomized trials found that statins given in late life to adults at vascular risk did not differ measurably from placebo on cognitive testing — neither preventing dementia nor showing clear group-level cognitive harm. For a deeper look at the evidence, see our guide on whether statins affect memory.

When to Suspect a Medication

Some clues raise the suspicion that a medication — rather than something else — is behind a cognitive change.

  • The symptoms started within days to weeks of starting, stopping, or changing the dose of a drug.
  • They get worse when the dose goes up and better when the dose goes down.
  • They are most prominent in the hours after taking a dose (especially with sedating drugs).
  • A new drug interaction or a new over-the-counter sleep aid coincides with the change.
  • The pattern looks more like fluctuating attention than progressive memory loss.

These signs do not prove the medication is the cause, but they make it a reasonable first hypothesis. For a wider differential, our guide to reversible causes of memory loss walks through medications alongside sleep, mood, thyroid, vitamin, and infection-related causes — and the related guide on brain fog versus cognitive decline is helpful when the picture is hazy rather than progressive.

When in doubt, take a medication list — including over-the-counter products and supplements — to a primary care or geriatric clinician for a structured review. Pharmacists are also an excellent first call. Many health systems offer formal medication therapy management visits at no cost.

How Clinicians Approach Medication and Cognition

Good prescribing in this space is rarely about one-size-fits-all rules. It usually follows a careful, individualized process:

  1. Take a complete medication inventory — prescriptions, OTC products, supplements, and substances like alcohol or cannabis.
  2. Match each drug to a current indication. Drugs that are no longer needed (a sleep aid started in a hospital, an anxiety medicine after a life crisis) are common deprescribing targets, as the NIA notes in its overview of polypharmacy.
  3. Look for high-risk combinations. Multiple sedating drugs together, drugs that compound anticholinergic burden, or drugs that interact in a way that increases blood levels.
  4. Consider non-drug alternatives. Cognitive behavioral therapy for insomnia, physical therapy for chronic pain, hearing aids for communication strain — each can reduce the need for cognitively burdensome drugs.
  5. Plan a taper, not an abrupt stop. Many of the drugs in this conversation should not be stopped suddenly. A clinician-guided taper is usually safer and more effective.
  6. Reassess. Cognitive symptoms and quality of life should be reviewed after each change.

The NIA's guide to taking medicines safely as you age is a useful patient-facing companion to this process, with practical tips on tracking doses, avoiding interactions, and working with a single pharmacy.

Where Cognitive Testing Fits

Cognitive testing does not diagnose a medication side effect. What it can do is give you and your clinician a structured, repeatable measure of how you are doing.

A few use cases where testing is especially useful:

  • Before starting a long-term medication that has known cognitive effects — particularly in your 40s, 50s, and 60s. A cognitive baseline gives you a personal reference point, so future changes can be compared to your own past performance rather than a population average.
  • When evaluating a possible medication-related change. Documenting attention and processing speed before and after a deprescribing trial can make the picture much clearer.
  • As part of an ongoing brain-health routine in people on multiple medications. Periodic at-home check-ins can flag changes early — see at-home cognitive testing for the broader context.

Structured measurement also makes appointments more efficient. Walking into a primary care or neurology visit with concrete numbers — and a list of medications — turns a vague worry into a workable question. Our guide on sharing cognitive test results with your doctor covers how to do that well, and the questions in what to ask a neurologist about memory translate directly when medications are part of the picture.

How This Fits With Bigger Brain Health

Medications are only one of many factors that shape brain health over a lifetime. The 2024 Lancet Commission on dementia identified 14 modifiable risk factors that, addressed together over the life course, could prevent or delay nearly half of dementia cases — including factors like hearing loss, hypertension, alcohol use, physical inactivity, social engagement, and untreated depression. Medications interact with that picture in two directions: they can be tools that treat those risk factors well, or they can become problems when they are no longer needed, are stacked unnecessarily, or carry cognitive costs that outweigh their benefits.

The same lifestyle levers that support brain health off the medicine cabinet — sleep, regular physical activity, treatment of vascular risks, vision and hearing care, social connection, mood treatment — also reduce reliance on the most cognitively burdensome drug classes. Our guide to lifestyle factors that support cognitive health covers the evidence in depth. For people noticing early changes who are not sure where they fall on the spectrum, our overview of early signs of cognitive decline is a useful companion, and our guide to when to get cognitive testing helps frame the decision about whether and when to seek evaluation.

What to Do Next

If you suspect a medication is affecting your thinking, the highest-yield steps are concrete. Bring a complete list of every prescription, OTC product, and supplement — with doses and how long you have taken each — to your next visit, and ask specifically about cognitive effects and interactions. Do this with a clinician or pharmacist who has time for a real review.

If you have noticed a change in attention or memory, document when it started, the pattern, whether it varies with the time of day, and what was happening in your medication regimen around then. A short cognitive check at home can sit alongside that history.

Taking the Next Step

To dig deeper into the wider differential — and the many non-medication causes of cognitive change — start with our guide to reversible causes of memory loss.

If you would like a structured, repeatable way to track attention, memory, and processing speed over time as you and your clinician make medication decisions, explore how Orena's at-home cognitive test works.