Endorphins.
Both laughing and crying help relieve stress. When we are stressed, our body releases cortisol into our bloodstream (get ready for fight or flight). Endorphins (mixed with chemicals such as serotonin, oxytocin, and dopamine) help clear this out of the bloodstream. When the cortisol is gone, we either feel happy or calm (relaxed).
One could say that melatonin and serotonin have the opposite function. Melatonin helps put one to sleep, while serotonin helps one wake up. This is a super basic explanation, as there’s a lot more to the 2 substances.
It’s not an “upper” (like caffeine). It’s a regulator. Although it’s sometimes referred to as the “happy hormone”, it actually does a lot more.