Happiness does not create humor. There's nothing funny about being happy. Sadness creates humor.
If you are a person who looks at the funny side of things, then sometimes when you are the lowest, when everything seems totally hopeless, you will come up with some of your best ideas.