This video explains it quite well. The key hormone in question is
serotonin. Serotonin is known to play a role in depression. Low serotonin levels are believed to be the reason for depression and associated symptoms of anxiety, apathy, fear, feelings of worthlessness, insomnia and fatigue. The opposite is true when a high-level of serotonin is present, you feel jovial and enthusiastic. MDMA promotes the formation of this hormone.
...