This Is My Faith - Al-fatlawi, Ali - الصفحة ١٢٤ - Is Happiness and Misery from Allah?
Anwar: But these two concepts – happy and unhappy – are attributes with which people are described in this life. How is that?
Hasan: My dear Brother, happiness and misery or unhappiness are two things mankind acquire during their lives; they are not attached to us from birth to death. Happiness and unhappiness are the result of certain requirements applicable to a certain degree and not of forcing or compulsion.
These requirements might be genetic, cultural or environmental as they might or might not influence us, because we are born with freedom of choice, so we are free to become happy or unhappy, and this freedom cannot be totally canceled by these elements.
Anwar: But how about this Prophetic Hadith: “An unhappy person turns unhappy in his mother’s womb, and a happy person turns happy in his mother’s womb”?
Hasan: I need you to focus, my Brother. If this Hadith has a reliable source linked to the Prophet Mohammad (PBUH), then it refers to this implication that human