People's happiness appears to be closely linked with how much sleep they get.