The highest and best use of the sexual energy is procreation; whether that be spiritual procreation (higher consciousness) by conservation of the shakti (sex) force, or material procreation for the purpose of children.
The next outcome, masterbation, in order to release congestion, is the lesser of two evils, though still unfortunate. And the last and worst use of the sex force is for indulging sexual fantasies. In particular meditators should avoid this as the sexual shakti force is so much better used in the service of unfolding higher consciousness and soul power....for what it's worth! :-)