Sleeping for more than nine hours a night has been linked to a higher risk of dying, while seven to eight hours was associated with the lowest mortality rate in a 30-year study.