Sleep quality among older stroke patients demonstrated heterogeneity, with those in the inefficient sleep with daytime dysfunction group exhibiting significantly higher frailty levels than those in the good sleep group. Furthermore, anxiety and depression played mediating roles in the relationship between sleep quality profiles and frailty.