I think the position religion takes on masturbation or sex in general depends on the faith you belong to. Catholics, for example, are taught that sex is strictly for pro-creation while many evangelical Christians believe that sex is a gift from God that is meant to be enjoyed for its own sake within marriage. Not sure what stance Jews and Muslims take on the subject but I'd be interested to learn if anyone can enlighten me.

Love is better than anger. Hope is better than fear. Optimism is better than despair. So let us be loving, hopeful and optimistic. And we’ll change the world.