Ibn Mas’ud (may Allah be pleased with him) narrated that the Prophet (peace be upon him) said:
“O you young people! Those of you who have the ability to do so should get married because this will make him look down and be more chaste for sex. And the one who does not have the capacity while he fasts because fasting will be for him a protection ”
(Reported by Bukhari in his Sahih n°5065 and Muslim in his Sahih n°1400)