A study of 18,631 twins in Finland, carried out between 1975 and 1981 looked at the relationship between people's quality of sleep and their satisfaction with life. In 1975 about 9% of the participants said they were dissatisfied with life and the same people were likely to be just as unhappy in 1981. However, the quality of these people's sleep did not get any worse between the two years. On the other hand, people who said they slept badly at the start of the study were 2.4 times more likely to be dissatisfied after six years and this relationship held true even after a number of other factors were taken into account. So, while unhappiness did not cause bad sleep, bad sleep did lead to an increase in unhappiness.
You can find out more about this research at