Monitor your masturbation habits. If there are times when the urge to masturbate is greater, try to schedule activities for these times. Taking group sports, yoga, joining a mindfulness meditation group, or whatever other activity you find interesting could help keep you distracted.