To examine the longer-term effect of physical activity (PA) intervention on sleep quality and whether the effect was heterogeneous between daytime nappers and non-nappers. This study was a secondary analysis of a cluster randomized controlled trial in China. Eight villages were randomized 1:1 to intervention or control group. The intervention group received an 8-week PA intervention, while the control group did not. The primary outcome of this study was the change in the Pittsburgh Sleep Quality Index (PSQI) global score at 24 months. The 511 participants had a mean age of 70.94 years (SD 5.73) and 55.6% were female. The intervention showed improvements in the PSQI global score at 8 weeks (adjusted mean difference -1.05; P=0.002), and the effect diminished at 24 months (-0.64; P=0.06). There were statistically significant improvements in the PSQI global score for daytime nappers, but not for non-nappers at 8 weeks (adjusted mean difference -0.98; P=0.01 vs -1.27; P=0.05), 12 months (-0.86; P=0.03 vs -0.84; P=0.21), and 24 months (-0.80; P=0.04 vs -0.14; P=0.84), although these improvements were below the minimum detectible level of the PSQI which is 1 point. The 8-week PA intervention was effective in improving sleep quality, while the effect was diminished and below the minimum detectible level of the PSQI which is 1 point after 24 months. The effect of PA intervention on sleep quality was more pronounced in daytime nappers. Additional interventions (e.g., focusing on multiple behavioral interventions such as PA and healthy diet) are needed to maintain the beneficial effect of PA on sleep quality in the general older populations. Further research is required to confirm the mechanisms of the effect of napping and develop tailored interventions.