Results showed that postoperative insomnia was a significant independent risk factor (OR = 2.42, 95%CI: 1.14–5.16, p = 0.022), with a significantly increased CPSP risk; FSH level was a protective factor (OR = 0.98, 95% CI: 0.97–0.99, p = 0.003), with each 1 IU/L increase in FSH associated with approximately a 1% reduction in CPSP risk. This evidence concerns the gene BRD2 and insomnia.