What someone else said: Fasting. The reason is that it's a form of bodily mortification and a rejection of the immediate feeding of the bodily appetites. It also builds discipline, which helps to tame all forms of self-indulgence. When linked to prayer, it is pleasing to God, and we are likely to have our prayers answered even faster.
The other thing is the rosary first thing in the morning. Get out of bed; don't lie in bed (another form of bodily self-indulgence).
Every guy I have known with a purity problem also had a sloth problem and an inclination to satisfy impulses of gluttony (not extra food but particular, sensually satisfying food). Nothing to do with weight or amount of food -- just self-indulgence by skinny guys, even.
Treat food and sleep as necessary evils for the purpose of survival and health and not enjoyment: basic, minimal. Every Lent the food I eat is as plain as possible, so that I will not particularly look forward to a meal but will eat to live, not live to eat.
Someone else said, and I concur: Keep busy, but not in a frenzied way because otherwise the devil might tempt you that you need to "relax" and seek out some pleasure. Simply have a business-like attitude about the day: Duty calls, because that's part of fighting the sloth of procrastination and fighting recreational enjoyments. You should think of yourself as putting your body and soul in training, both.