Objective To investigate the research hotspots and tendency related to sleep disorders and diabetes mellitus based on the CiteSpace software. Methods Literature related to sleep disorder and diabetes mellitus was retrieved from China National Knowledge Infrastructure. The CiteSpace 6.1.R6 bibiliometrics software was employed to perform visualized analysis on authors, institutes, keywords of the enrolled literature, and then network knowledge graph was drawn. Results A total of 743 literature related to sleep disorder and diabetes mellitus was enrolled. From 2003 to 2023, the annual number of publications generally revealed an upward trend. Lin Xuxing and Zhou Fangyuan were the authors with the most number of publications, and Beijing University of Chinese Medicine was the institute with the most number of publications. There was less cooperation between authors and between institutes. Type 2 diabetes mellitus, diabetes mellitus, sleep quality, sleep disorder, depression, and elderly diabetes mellitus were the research tendency in the field of sleep disorder and diabetes mellitus. Geriatric diabetes mellitus, gestational diabetes mellitus, correlation, blood glucose fluctuation, chronic disease, ear acupressure and so on were the research hotspots in the field of sleep disorder and diabetes mellitus. Conclusion The core team of research related to sleep disorder and diabetes mellitus has not yet been formed, and the cooperation between authors and institutes needs to be strengthened. In the future, this field will focus on affected population of the elderly patients with diabetes mellitus and patients with gestational diabetes mellitus, as well as on research such as the correlation between sleep disorder and diabetes mellitus, influencing factors for sleep disorder and diabetes mellitus, and chronic complications and Traditional Chinese Medicine treatment of sleep disorder and diabetes mellitus.