The PSQI score was associated with age, years of education, ESR, CRP, overall assessment of health, pain, morning stiffness, Bath Ankylosing Spondylitis Disease Activity Index (BASDAI), Bath Ankylosing Spondylitis Functional Index (BASFI), depression, and anxiety (all P < 0.001), but were not associated with disease duration, fingertip-to-floor distance, and Bath Ankylosing Spondylitis Metrology Index (BASMI) (P > 0.05). The gene discussed is CRP; the disease is spondylitis.