Objective To explore the influencing factors of sleep quality of the elderly in Chengdu community and put forward corresponding nursing strategies. Methods The elderly in four communities in Chengdu were selected by convenient sampling method from January to June 2021. The elderly in the community were investigated and analyzed by general information questionnaire, Interpersonal Relationship Integrative Diagnostic Scale (IRIDS) and Pittsburgh Sleep Quality Index (PSQI). Multiple linear stepwise regression was used to analyze the factors affecting the sleep quality of the elderly. Results A total of 232 elderly were investigated and 211 were finally included. The total score of PSQI in the elderly was positively correlated with the score of interpersonal conversation disturbance (r=0.297, P<0.05) and the score of treating people disturbance (r=0.208, P<0.05). The results of multiple linear stepwise regression analysis showed that physical exercise, monthly amount of money, education and four dimensions of interpersonal troubles were the main influencing factors of sleep quality in the elderly. Conclusions The community elderly in this study had better sleep quality. Physical exercise, monthly amount of money, education and four dimensions of interpersonal troubles were all important factors affecting the sleep quality of the elderly. Community nursing staff should pay more attention to the sleep quality of the elderly, put forward measures to improve the related factors leading to sleep disorders, encourage the elderly to take physical exercise. They should also provide psychological counseling and interpersonal communication skills for the elderly with interpersonal troubles and help expand the communication platform to improve sleep quality of the elderly in the community.