God forgiveth you your nocturnal emissions and masturbation. But know ye the value of your seed, for your seed is the cause of the creation of one who worshippeth God. Keep your seed in the exquisite place. The purpose of this command is that perhaps the fruit of your existence will come to the aid of the religion of God. When semen cometh out by your own free will, make the ablutions, prostrate yourself and say this verse nineteen
times: ‘Thou art the Most Pure and Sublime, O my God! Thou art free from error and lack. There is none other God save Thee! I proclaim Thy sublimity, and I am of those who know that Thou art the Pure.’”
(Báb, Arabic Bayan, Vahid 8, Bab 10; provisional translation)
Let your eye be chaste, your hand faithful, your tongue truthful and your heart enlightened.
(Bahá’u’lláh, Tablets of Bahá’u’lláh, p. 138)
Masturbation is clearly not a proper use of the sex instinct, as this is understood in the Faith. Moreover it involves … mental fantasies, while Bahá’u’lláh, in the Kitáb-i-Aqdas, has exhorted us not to indulge our passions and in one of His well-known Tablets ‘Abdu’l-Bahá encourages us to keep our “secret thoughts pure”.
(Universal House of Justice, 1981, Lights of Guidance, p. 364)