> I wonder if 8h of sleep is the cause of the better performance or they both are a result of less stressful life, better health or something else.
This illustrates well the problem with these kinds of studies. How do we know that stress isn't causing both little/poor sleep and e.g. decreased cognitive performance (as opposed to little sleep being the cause of a decrease in cognitive performance)?
It's not like we can create a control group where stressed people are forced to get 8 hours of good sleep every night.