Difficulty sleeping may contribute to a risk of suicide in older adults, a new study by Stanford University researchers has found.

Adults 65 and older who reported having trouble sleeping, regardless of whether they also suffered from a depressed mood, were 20 percent more likely to take their own lives, according to the findings of a study that appeared Wednesday in JAMA Psychiatry.

The study’s appearance coincides by chance with an outpouring of grief over Monday’s suicide of comedian Robin Williams, who was 63.

“It just shows that no one is immune to the risks of depression,” the study’s lead author, Rebecca A. Bernert , a suicidologist at Stanford’s School of Medicine, said. In an interview by telephone, Bernert said her team’s research further highlights the importance of screening suicide risk by identifying sleep disorders in older people and treating them.

The Centers for Disease Control and Prevention reported in June that U.S. suicide rates rose slightly for the fifth consecutive year, to a rate of 12.3 per 100,000 people in 2011, compared with 12.1 per 100,000 a year earlier.

Stanford’s epidemiological study examined data on 420 people who were an average of about 75 years old and living in the community. The group — 400 control patients and 20 who died by suicide, selected from among 14,456 participants-- were tracked over a 10 year period.

Those who reported sleep troubles were 1.4 times more likely to die by suicide, the study found. After controlling for the effects of a depressed mood, the study found that those with sleep difficulties still showed 1.2 times greater risk of suicide.

Difficulty falling asleep and nonrestorative sleep — in which a person may sleep for an appropriate amount of time but awake without feeling refreshed — appeared to be the two biggest risk factors in suicide-associated sleep disorders, Bernert said

Bernert acknowledged that the increased risk factor may appear small on its face. But even the slightest difference in effect has enormous importance when one considers that the outcome is death, and that the phenonemon — suicide — is rare and inherently difficult to predict.Yet sleep disorders, she said, are known to be among the clearest indicators of depression and suicide risk.

“Suicide is preventable,” she said.