Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology Study

BackgroundPeople share health-related experiences and treatments, such as for insomnia, in digital communities. Natural language processing tools can be leveraged to understand the terms used in digital spaces to discuss insomnia and insomnia treatments. Objective...

Full description

Saved in:
Bibliographic Details
Main Authors: Jack A Cummins, Daniel J Gottlieb, Tamar Sofer, Danielle A Wallace
Format: Article
Language:English
Published: JMIR Publications 2025-01-01
Series:Journal of Medical Internet Research
Online Access:https://www.jmir.org/2025/1/e58902
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1841551608654069760
author Jack A Cummins
Daniel J Gottlieb
Tamar Sofer
Danielle A Wallace
author_facet Jack A Cummins
Daniel J Gottlieb
Tamar Sofer
Danielle A Wallace
author_sort Jack A Cummins
collection DOAJ
description BackgroundPeople share health-related experiences and treatments, such as for insomnia, in digital communities. Natural language processing tools can be leveraged to understand the terms used in digital spaces to discuss insomnia and insomnia treatments. ObjectiveThe aim of this study is to summarize and chart trends of insomnia treatment terms on a digital insomnia message board. MethodsWe performed a natural language processing analysis of the r/insomnia subreddit. Using Pushshift, we obtained all r/insomnia subreddit comments from 2008 to 2022. A bag of words model was used to identify the top 1000 most frequently used terms, which were manually reduced to 35 terms related to treatment and medication use. Regular expression analysis was used to identify and count comments containing specific words, followed by sentiment analysis to estimate the tonality (positive or negative) of comments. Data from 2013 to 2022 were visually examined for trends. ResultsThere were 340,130 comments on r/insomnia from 2008, the beginning of the subreddit, to 2022. Of the 35 top treatment and medication terms that were identified, melatonin, cognitive behavioral therapy for insomnia (CBT-I), and Ambien were the most frequently used (n=15,005, n=13,461, and n=11,256 comments, respectively). When the frequency of individual terms was compared over time, terms related to CBT-I increased over time (doubling from approximately 2% in 2013-2014 to a peak of over 5% of comments in 2018); in contrast, terms related to nonprescription over-the-counter (OTC) sleep aids (such as Benadryl or melatonin) decreased over time. CBT-I–related terms also had the highest positive sentiment and showed a spike in frequency in 2017. Terms with the most positive sentiment included “hygiene” (median sentiment 0.47, IQR 0.31-0.88), “valerian” (median sentiment 0.47, IQR 0-0.85), and “CBT” (median sentiment 0.42, IQR 0.14-0.82). ConclusionsThe Reddit r/insomnia discussion board provides an alternative way to capture trends in both prescription and nonprescription sleep aids among people experiencing sleeplessness and using social media. This analysis suggests that language related to CBT-I (with a spike in 2017, perhaps following the 2016 recommendations by the American College of Physicians for CBT-I as a treatment for insomnia), benzodiazepines, trazodone, and antidepressant medication use has increased from 2013 to 2022. The findings also suggest that the use of OTC or other alternative therapies, such as melatonin and cannabis, among r/insomnia Reddit contributors is common and has also exhibited fluctuations over time. Future studies could consider incorporating alternative data sources in addition to prescription medication to track trends in prescription and nonprescription sleep aid use. Additionally, future prospective studies of insomnia should consider collecting data on the use of OTC or other alternative therapies, such as cannabis. More broadly, digital communities such as r/insomnia may be useful in understanding how social and societal factors influence sleep health.
format Article
id doaj-art-b4a45be6454046a9bd74cf9ff7f96e78
institution Kabale University
issn 1438-8871
language English
publishDate 2025-01-01
publisher JMIR Publications
record_format Article
series Journal of Medical Internet Research
spelling doaj-art-b4a45be6454046a9bd74cf9ff7f96e782025-01-09T16:00:52ZengJMIR PublicationsJournal of Medical Internet Research1438-88712025-01-0127e5890210.2196/58902Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology StudyJack A Cumminshttps://orcid.org/0000-0003-0978-0421Daniel J Gottliebhttps://orcid.org/0000-0001-8812-8751Tamar Soferhttps://orcid.org/0000-0001-8520-8860Danielle A Wallacehttps://orcid.org/0000-0001-7033-2172 BackgroundPeople share health-related experiences and treatments, such as for insomnia, in digital communities. Natural language processing tools can be leveraged to understand the terms used in digital spaces to discuss insomnia and insomnia treatments. ObjectiveThe aim of this study is to summarize and chart trends of insomnia treatment terms on a digital insomnia message board. MethodsWe performed a natural language processing analysis of the r/insomnia subreddit. Using Pushshift, we obtained all r/insomnia subreddit comments from 2008 to 2022. A bag of words model was used to identify the top 1000 most frequently used terms, which were manually reduced to 35 terms related to treatment and medication use. Regular expression analysis was used to identify and count comments containing specific words, followed by sentiment analysis to estimate the tonality (positive or negative) of comments. Data from 2013 to 2022 were visually examined for trends. ResultsThere were 340,130 comments on r/insomnia from 2008, the beginning of the subreddit, to 2022. Of the 35 top treatment and medication terms that were identified, melatonin, cognitive behavioral therapy for insomnia (CBT-I), and Ambien were the most frequently used (n=15,005, n=13,461, and n=11,256 comments, respectively). When the frequency of individual terms was compared over time, terms related to CBT-I increased over time (doubling from approximately 2% in 2013-2014 to a peak of over 5% of comments in 2018); in contrast, terms related to nonprescription over-the-counter (OTC) sleep aids (such as Benadryl or melatonin) decreased over time. CBT-I–related terms also had the highest positive sentiment and showed a spike in frequency in 2017. Terms with the most positive sentiment included “hygiene” (median sentiment 0.47, IQR 0.31-0.88), “valerian” (median sentiment 0.47, IQR 0-0.85), and “CBT” (median sentiment 0.42, IQR 0.14-0.82). ConclusionsThe Reddit r/insomnia discussion board provides an alternative way to capture trends in both prescription and nonprescription sleep aids among people experiencing sleeplessness and using social media. This analysis suggests that language related to CBT-I (with a spike in 2017, perhaps following the 2016 recommendations by the American College of Physicians for CBT-I as a treatment for insomnia), benzodiazepines, trazodone, and antidepressant medication use has increased from 2013 to 2022. The findings also suggest that the use of OTC or other alternative therapies, such as melatonin and cannabis, among r/insomnia Reddit contributors is common and has also exhibited fluctuations over time. Future studies could consider incorporating alternative data sources in addition to prescription medication to track trends in prescription and nonprescription sleep aid use. Additionally, future prospective studies of insomnia should consider collecting data on the use of OTC or other alternative therapies, such as cannabis. More broadly, digital communities such as r/insomnia may be useful in understanding how social and societal factors influence sleep health.https://www.jmir.org/2025/1/e58902
spellingShingle Jack A Cummins
Daniel J Gottlieb
Tamar Sofer
Danielle A Wallace
Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology Study
Journal of Medical Internet Research
title Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology Study
title_full Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology Study
title_fullStr Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology Study
title_full_unstemmed Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology Study
title_short Applying Natural Language Processing Techniques to Map Trends in Insomnia Treatment Terms on the r/Insomnia Subreddit: Infodemiology Study
title_sort applying natural language processing techniques to map trends in insomnia treatment terms on the r insomnia subreddit infodemiology study
url https://www.jmir.org/2025/1/e58902
work_keys_str_mv AT jackacummins applyingnaturallanguageprocessingtechniquestomaptrendsininsomniatreatmenttermsontherinsomniasubredditinfodemiologystudy
AT danieljgottlieb applyingnaturallanguageprocessingtechniquestomaptrendsininsomniatreatmenttermsontherinsomniasubredditinfodemiologystudy
AT tamarsofer applyingnaturallanguageprocessingtechniquestomaptrendsininsomniatreatmenttermsontherinsomniasubredditinfodemiologystudy
AT danielleawallace applyingnaturallanguageprocessingtechniquestomaptrendsininsomniatreatmenttermsontherinsomniasubredditinfodemiologystudy