2.38 When one is confirmed in celibacy, spiritual vigor is gained.
Sex and Yoga are intertwined. The basis of kundalini yoga is moving the reproductive force t trapped at the bottom of the spine to the third eye chakra. Yogic monk practice celibacy to preserve the creative force as they work to move prana around in their bodies. Tantric Yoga is fully devoted to harnessing the sexual energy directly for enlightenment.
So what does this mean for the everyday person? Well, the opinions on that go across the board. In the most extreme case, some Yogic traditions call for no sex unless you intend on procreating. Mahatma Ghandi is rumored to only to have had sex with his wife a for procreation. Other traditions state that you should not have sex outside of a committed relationship.
The urge to procreate is one of the four Yogic "fountains". These urges cannot be extinguished, so the Yogi is taught to work with them. If you live in denial of this fundamental nature, you can cause yourself all kinds of issues.
There are many Yogic practices out there that harness the sexual force for spiritual gain. Take a look around and see what works for you.