Scott Galloway explains the cause in this video from CNBC Make It.

Studies have shown that there is a shape to the amount of happiness you experience on a regular basis over the course of your lifetime--a U-shape, to be exact. As a child and young teenager, people generally experience more happiness and general satisfaction with life. As people move into their mid to late 20s and early 30s, happiness tends to decrease as they experience the stress of life and realize that not every goal or expectation that they set for themselves is going to become reality. It's normal to experience more disappointment or sadness during this time.

But if you're at the bottom of the U, there has to be another side to the curve, which means there is an increase in happiness over time. In your 40s and 50s, you start to consider everything you have achieved in your life, rather than fixating on everything you wanted to do but haven't. Mourning lost opportunities or relationships takes a back seat to thinking about children or grandchildren, job satisfaction, and valuing things you're fortunate to have.

So, if you're entering a rough patch in life with your job, school, or personal life, keep in mind that situations like these are temporary and happiness is out there waiting for you.