Older adults with pain for more than a day are more likely to report trouble sleeping years later, according to a new study.

The risk of long-term sleep problems was even higher for people reporting widespread pain in the survey.

It might not be just the pain that’s leading to insomnia, the researchers say. Instead, much of the connection could be explained by lifestyle changes that often happen due to persistent pain, said lead author Nicole K.Y. Tang of the University of Warwick in Coventry, UK.

After 3 years, compared to people without pain at the start, the people with pain were more likely to say their sleep problems had worsened, according to results in the journal Rheumatology. And those with widespread pain at the start were twice as likely to develop insomnia as those with no pain.