In 2017, a study done in Germany found that masturbating to orgasm can trigger the production of a natural cannabinoid called 2-arachidonoylglycerol or 2-AG. The results led researchers to believe that cannabis may be helpful in treating sexual problems such as loss of libido or ED. The endocannabinoid system is so important that some experts believe that a deficiency of endocannabinoids can lead to a number of conditions, including migraines, fibromyalgia, and irritable bowel syndrome.