The Biblical story of Onan (Genesis 38:6–10) is interpreted by many commentators as a source for prohibiting ejaculation outside a woman's body, including masturbation.
Rabbi Nachman of Breslov claimed that masturbation leads to depression, and that the effects of impure ejaculation can only be nullified through the recitation of the Tikkun Haklali.
[27] According to Sefer haChinuch, one of the reasons for the prohibition on male homosexual sex is that sperm is destroyed for no constructive purpose.
Rebecca Alpert states that the traditional Jewish religious authorities did not take female masturbation seriously, considering even lesbianism to be a minor transgression.
[34] There is disagreement among the poskim (decisors of Jewish law) whether masturbation is an acceptable way of procuring semen for artificial insemination or in vitro fertilisation.
Rabbi Meir recommended a man perform coitus interruptus (דש מבפנים וזורה מבחוץ) with his wife while she is pregnant or nursing, for health reasons.
[41] Tosafot cites the opinion of Rabbi Yitzchak (Isaac ben Samuel) who permitted an occasional exterior ejaculation with one's wife on the condition that one does not accustom himself to always doing so, as this is not considered comparable to Onan, who wished to avoid impregnating Tamar entirely.
[42] This opinion is accepted as normative by Rabbeinu Asher,[43] Arba'ah Turim,[44] Sefer HaAguddah,[45] Maharsha,[46] Bayit Chadash,[47] Eliyah Rabbah,[48] and some other authorities.
[49] A more explicit permissive stance is that of the tosafist rabbi Isaiah di Trani the Elder: What was the (forbidden) action of Er and Onan that the Torah prohibits?
that committed with the intent of not diminishing her beauty (due to pregnancy) and he doesn't desire to fulfill the mitzvah of procreation (פרו ורבו) with her.
[55] Rabbi Walter Jacob, writing on behalf of the Reform responsa committee, asserts, "Although the statements of tradition are very clear, we would take a different view of masturbation, in the light of current psychological thought.
She points out that masturbation can lower risk for prostate cancer, offers stress relief, can lead to healthier sexual relationships.
"[58] Conservative rabbi Elliot Dorff has noted that Maimonides states that the Tanakh does not explicitly prohibit masturbation.