Researchers looked at sleep patterns in older adults to find the connection.