It has a powerful effect upon you physically. It diverts some of that physical energy to more ordinary needs. It tapers desire and reduces the temptation. Fasting will help you greatly. In the scriptures, fasting and prayer are generally mentioned together.
Prayer is a powerful instrument to bless young men.
If a missionary, for instance, indulges in these unworthy practices, the Spirit of the Lord will leave him. When he is prayerful and will fast, the Spirit of the Lord sustains him. He soon develops a manly restraint and worthiness. Resist those temptations. Do not tamper with your body.