5-HTP is a precursor to serotonin, a neurotransmitter in the brain that is responsible for happiness, wellbeing, and mood. Serotonin is also a precursor to melatonin, which is vital for sleep. Therefore, taking a 5-HTP supplement can help with both mood and sleep.