Insomnia ICD-10 Codes Explained: G47.0, F51.0, and More

Quick answer: The primary ICD-10-CM codes for insomnia are G47.00 (insomnia, unspecified) and F51.01 (primary insomnia). G47.0x codes cover organic sleep disorders; F51.0x codes cover non-organic (psychophysiological/primary) insomnia. The correct code depends on the clinical presentation and any comorbid conditions.

Whether you're a clinician coding a claim, a patient trying to understand your diagnosis, or a researcher reviewing records, here's a clear breakdown of every insomnia ICD-10 code and what each means.

Key takeaways

  • G47.00 — Insomnia, unspecified (most commonly used in primary care).
  • G47.01 — Insomnia due to a medical condition (specify the condition separately).
  • G47.09 — Other insomnia (not otherwise specified organic insomnia).
  • F51.01 — Primary insomnia (psychophysiological; no underlying organic cause).
  • F51.02 — Adjustment insomnia (acute, related to a stressor).
  • F51.04 — Psychophysiological insomnia.
  • F51.05 — Insomnia due to a mental disorder (code the disorder separately).

The two ICD-10 code families for insomnia

G47 — Organic sleep disorders

The G47 block covers sleep disorders classified as having an organic (medical or neurological) basis:

  • G47.00 — Insomnia, unspecified: the catch-all code used when insomnia is documented but the subtype is not specified. It is the most frequently billed insomnia code in primary care and emergency settings.
  • G47.01 — Insomnia due to a medical condition: used when insomnia is directly caused by a medical condition (e.g., pain, hyperthyroidism, GERD). An additional code for the underlying condition should be sequenced first.
  • G47.09 — Other insomnia: covers organic insomnia presentations not captured by G47.00 or G47.01.

F51 — Non-organic sleep disorders

The F51 block, from the Mental and Behavioral Disorders chapter of ICD-10, covers insomnia without a primary organic cause:

  • F51.01 — Primary insomnia: insomnia not attributable to a medical, neurological, or substance-related cause. This is the code most aligned with "chronic insomnia disorder" as defined by the American Academy of Sleep Medicine.
  • F51.02 — Adjustment insomnia: short-term insomnia directly related to an identifiable stressor. Expected to resolve when the stressor is removed or the individual adapts.
  • F51.03 — Paradoxical insomnia: a complaint of severe insomnia with sleep misperception (the person sleeps more than they perceive).
  • F51.04 — Psychophysiological insomnia: heightened somatic tension and learned sleep-preventing associations (bed as a cue for arousal). This is the classic presentation targeted by CBT-I.
  • F51.05 — Insomnia due to another mental disorder: insomnia occurring as a feature of a mental health condition such as depression or anxiety. Code the underlying disorder separately.
  • F51.09 — Other non-organic insomnia.

Which code to use: G47 vs. F51

The general guidance is:

  • Use F51.01 for chronic, primary insomnia without a clear medical or psychiatric driver — the typical presentation in sleep medicine.
  • Use G47.00 when documenting insomnia generally, especially in settings where full sleep history is not available (e.g., urgent care, ED).
  • Use G47.01 or F51.05 when comorbid conditions contribute, coding the primary condition first.

Note: Under the DSM-5 and ICSD-3 (the AASM's own classification), the separate diagnostic categories have been consolidated into "insomnia disorder," reducing the old distinction between primary and secondary insomnia.

ICD-10 codes for related sleep conditions

  • G47.10 — Hypersomnia, unspecified
  • G47.33 — Obstructive sleep apnea
  • G47.411 — Narcolepsy with cataplexy
  • G47.61 — Periodic limb movement disorder
  • G25.81 — Restless legs syndrome

Insomnia treatment and documentation

Accurate ICD-10 coding supports appropriate reimbursement for insomnia treatment, including CBT-I — which is recognized by the AASM as the first-line treatment for chronic insomnia disorder. When submitting claims for digital or in-person CBT-I, F51.01 or G47.00 are the most commonly accepted primary diagnosis codes.

If you're a patient looking for clinical insomnia support, Circady's sleep assessment can help identify your specific insomnia pattern and the most relevant treatment approach.

Frequently asked questions

What is the ICD-10 code for insomnia?

The most common ICD-10 codes for insomnia are G47.00 (insomnia, unspecified) and F51.01 (primary insomnia). G47.00 is the most frequently used in general practice.

What is the difference between G47.00 and F51.01?

G47.00 is a broad code for unspecified organic insomnia; F51.01 is specifically for primary (non-organic, psychophysiological) insomnia with no identifiable medical cause. Sleep specialists and psychiatrists typically use F51.01 for chronic primary insomnia.

What is the ICD-10 code for chronic insomnia?

F51.01 (primary insomnia) is most closely aligned with the diagnosis of chronic insomnia disorder as defined by the AASM's ICSD-3, though G47.00 is also widely used.

What ICD-10 code is used for insomnia due to anxiety?

If insomnia is clearly attributable to an anxiety disorder, use F51.05 (insomnia due to another mental disorder) and code the anxiety disorder separately. If insomnia is the primary diagnosis regardless of anxiety, F51.01 or G47.00 may be more appropriate depending on documentation.

Related reading

References

  1. American Academy of Sleep Medicine. International Classification of Sleep Disorders, 3rd ed. (ICSD-3). Darien, IL: AASM; 2014.
  2. Centers for Disease Control and Prevention. ICD-10-CM Official Guidelines for Coding and Reporting FY2026. cdc.gov/nchs/icd
  3. American Psychiatric Association. Diagnostic and Statistical Manual of Mental Disorders, 5th ed. (DSM-5). Arlington, VA; 2013.

Medically reviewed by Dr. Alf Fischbein, MD — June 1, 2026.

This article is for educational and informational purposes. ICD-10 coding guidance is subject to annual updates; always verify codes against the current-year CMS tables for billing purposes. This is not medical or legal advice.


You may also like

View all
Example blog post
Example blog post
Example blog post