Not really.
Masturbation is stimulation of the genitalia to achieve sexual pleasure. In men sexual pleasure is exhibited by an ejaculation that includes sperm. The sperm then needs to be regenerated. So frequent masturbation can deplete sperm that was stored in the testes. Fortunately the regeneration is very fast and used stocks are soon replaced.
Most religions and social norms frown upon masturbation and maybe in an effort to enforce the disapproval of the practice then stories of possible infertility are told.
Comments