Can cotrimoxazole (trimethoprim/sulfamethoxazole) cause insomnia?

Medical Advisory BoardAll articles are reviewed for accuracy by our Medical Advisory Board
Educational purpose only • Exercise caution as content is pending human review
Article Review Status
Submitted
Under Review
Approved

Last updated: September 27, 2025View editorial policy

Personalize

Help us tailor your experience

Which best describes you? Your choice helps us use language that's most understandable for you.

Cotrimoxazole and Insomnia

Yes, cotrimoxazole (trimethoprim/sulfamethoxazole) can cause insomnia as an adverse effect, though it is not among the most commonly reported side effects.

Side Effect Profile of Cotrimoxazole

Cotrimoxazole (TMP-SMX) has a range of documented adverse effects, with the most common being:

Common Side Effects:

  • Skin reactions (rash, urticaria)
  • Gastrointestinal disturbances
  • General disturbance of well-being 1

Neurological/CNS Side Effects:

  • Insomnia can occur, though less frequently reported than skin or GI effects
  • Other CNS effects may include headache, dizziness, and fatigue

Serious Adverse Effects:

  • Severe skin reactions (Stevens-Johnson syndrome, toxic epidermal necrolysis)
  • Hematological effects (thrombocytopenia, anemia)
  • Anaphylactic reactions 1

Mechanism of Action and Sleep Disturbance

The mechanism by which cotrimoxazole may cause insomnia is not fully elucidated, but may involve:

  1. Direct CNS effects of trimethoprim component
  2. Metabolic interactions affecting neurotransmitter pathways
  3. Systemic inflammatory responses to the medication

Risk Factors for Insomnia with Cotrimoxazole

Certain factors may increase the risk of experiencing insomnia with cotrimoxazole:

  • Higher dosages ("forte" preparations have 3.3 times more side effects than standard dosage) 1
  • IV administration (associated with more side effects than oral administration) 1
  • Concurrent medications that affect sleep or interact with cotrimoxazole
  • Pre-existing sleep disorders
  • Drug interactions with other medications that affect CYP enzyme systems 2

Management Recommendations

If a patient experiences insomnia while taking cotrimoxazole:

  1. Assess severity and impact on quality of life

    • Determine if sleep disturbance is significantly affecting daytime functioning
  2. Consider timing of medication

    • Administering the medication earlier in the day may reduce sleep disturbances
  3. Evaluate necessity of cotrimoxazole

    • For many common infections, trimethoprim alone may be equally effective with fewer side effects 3
    • Reserve cotrimoxazole for specific indications where it is clearly superior:
      • Pneumocystis pneumonia
      • Toxoplasmosis
      • Nocardiosis
      • Specific other infections 3
  4. Consider alternatives if appropriate

    • For many common infections, alternative antibiotics may be suitable:
      • Amoxicillin
      • Azithromycin
      • Clarithromycin 2
  5. Monitor for other adverse effects

    • Insomnia may be an early indicator of other adverse reactions
    • Watch for skin reactions, hematological changes, or other CNS symptoms

Special Considerations

  • HIV patients: Cotrimoxazole is commonly used for Pneumocystis pneumonia prophylaxis and treatment, where benefits typically outweigh the risk of insomnia 4
  • Renal patients: Used in dialysis catheter lock solutions to prevent infection, where systemic absorption is minimal 4
  • Drug interactions: Cotrimoxazole can interact with other medications through CYP enzyme inhibition, potentially exacerbating sleep disturbances 2

Conclusion

While insomnia is not among the most commonly reported side effects of cotrimoxazole, it can occur and may impact quality of life. When prescribing cotrimoxazole, consider the risk-benefit ratio, especially when alternative antibiotics might be appropriate for the clinical situation. For conditions where cotrimoxazole is specifically indicated, the benefits typically outweigh the risk of insomnia.

References

Guideline

Drug Interactions and Safety Precautions

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Research

Limitations of and indications for the use of co-trimoxazole.

Journal of chemotherapy (Florence, Italy), 1994

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Professional Medical Disclaimer

This information is intended for healthcare professionals. Any medical decision-making should rely on clinical judgment and independently verified information. The content provided herein does not replace professional discretion and should be considered supplementary to established clinical guidelines. Healthcare providers should verify all information against primary literature and current practice standards before application in patient care. Dr.Oracle assumes no liability for clinical decisions based on this content.

Have a follow-up question?

Our Medical A.I. is used by practicing medical doctors at top research institutions around the world. Ask any follow up question and get world-class guideline-backed answers instantly.