From a Guide to Mormon Youth
Pray fervently and out loud when the temptations are the strongest.
When the temptation to masturbate is strong, yell "Stop!" to those thoughts as loudly as you can in your mind. Then recite a portion of the Bible or sing a hymn.
Double your physical activity when you feel stress increasing.
Make a pocket calendar for a month on a small card. Carry it with you but show it to no one.
If you masturbate, color that day black. Your goal will be to have no black days.
The calendar becomes a strong visual reminder, and should be looked at when you are tempted to add another black day.
Keep your calendar up until you have at least three clear months.
Set up a reward system. Each time you reach a goal, award yourself a quarter. Spend it on something that delights you.
Be outgoing and friendly. Force yourself to be with others and learn to enjoy working and talking with them.
Change in behavior and attitude is most easily achieved through a changed self-image.
Spend time every day imagining yourself strong and in control, easily overcoming tempting situations.
Arise immediately in the mornings. Don't lie awake in bed -- start each day with enthusiastic activity.
Avoid people, situations, pictures and reading material that might create sexual excitement.
Put on several layers of clothing that would be difficult to remove while half asleep.
Hold an object -- for example, a Bible -- even in bed at night.
In severe cases, tie a hand to the bed frame.
Plan to counter these low periods through reading a book, visiting a friend, doing something athletic, etc.
Employ aversion therapy. To cancel out the pleasurableness of masturbating, associate something very distasteful with the act. For example, imagine bathing in a tub of worms and eating some of them.
Often an erotic dream is experienced at the same time, and is a part of this normal process.