Suppose, a couple is trying for a child. In that case, prior to that, how long should the husband conserve the semen (avoid masturbation/or sex) for a good child.
The Mahapurushas say the couples must be in Brahmacharya for first 4 years after marriage and do rigorous Sadhana and Bhakti in meanwhile for begetting a santana who would be a Dharmatma. (Since, a person enters into Grihastashram for not sufficing his bodily temptation but with a steadfast point to serving Parents, Sadhus, Pitras, Guru, Jeevas, Kuldevtas and to get a divine child who would take Vamsha Parampara further and thus we repaying our 3 debts of Pitra, Devtas and Guru. With sole such a motive Grihasta dharma is followed.)
Now if, suppose a person can't delay the conceivement, thus he must atleast stay in Brahmacharya for 1 year. Here Brahmacharya is for both couples and doesn't means, one can indulge into any sexual blabbering around the tables. In this 1 year they must do as much as sadhana, tapa, dhyaan as they can. And finally on the onset of a pleasant season one must do sampurna puja of Pitras and Kuldevis and ask for the boon for a divine child and then go into Personal chambers. Some pujan vidhi too is there to be done before the copulation.
Now addressing the main part.
Like, I have read scientific works which says that if one make masturbates frequently while trying for a kid, the quality of semen would be better.
I would answer this in two parts:
Under medical reasoning.
With shastra pramana.
Nothing could be more funny than this to me. I myself being in medical field have human physiology as a major subject and nothing such is true. Because, remember sperm formation never stops in man. It's that if you don't ejaculate, there would be phagocytosis of old sperm ( would be destroyed) and new set of sperm would be formed within testis itself. It has got nothing like if you ejaculte more there would be more chances of better sperm. Secondly, the more you ejaculate the more chances will happen that a faulty sperm is formed because of the pace of with which division would go, would add a chance of doing faulty cell division (chances are very very less, almost nil, still can't be ignored). So, that's not true. Let's get to Shastra Pramana.
- Masturbation is indeed a sin.
Devi Bhagwat Puran, 9th Skanda, 10th chapter,
If anybody, out of his amorous passion casts his semen privately on the suface of the ground, he will have to suffer the torments of hell for as many years as the numbers of dust particles on that area.
Since, as per Shastras the Dharti mata can't bear the sperm on her. So, you can't think of releasing sperm on land. The shastras again says, releasing sperms in water is sin again.
By discharging semen into inhuman females, into a woman in [her] menses, into others that have no female organs, or into water one should perform the penance of Santapanam.
(Atri Smriti, Chapter 1, Verse 268)
Baudhayana Sutra 3rd Skanda, 7th chapter, Shloka 2,
One who does not have sex with his wife during her season, and one who has sex with her outside her season, as also one who deposits his semen in a place other than the vagina ––they all incur the same guilt.
Apastamba Sutra, Pratham Skanda, 19,15:
A man who ejaculates his semen in any place other than the vagina becomes equal to a thief, equal to a murderer of a Brahmin.
So, masturbation can't be justified for better sperms hypothesis, as by Shastra pramana and even by simple medical reasonings.
The next question arises is that, the couple needs to try again and again to get conceived. So, at what frequency can they try?
The answer is here,
Ashthang Hridyam by Maharishi Vagbhatta, 7th chapter,
सेवेत कामतः कामं तृप्तो वाजीकृताम् हिमे|
त्रयहाद्वसंतशारदोह् पक्षाद्वार्षानिदाघयोह् ||73||
भ्रम क्ल मोरु दौर्बल्य बलधात्वींद्रीयक्षयाह् |
अपर्वमरणम् च स्यादन्यथा गच्छतः स्त्रीयं ||74||
In pleasant seasons like Vasant and when it's optimum cold etc, in a gap of 3-3 days if healthy and not diseased and provided with supplements (like Ashvagandha, etc) and in seasons like Summer and Monsoon with a gap of 15-15 days the man can have physical intimacy with women(only his wife).
So, since depositing sperm outside female body is sin, forcing the women to get intimate is again sin. So, the best option is, when the women gets Ritusnata, let her ask for, "Ritum dehi" with the sole intention of giving birth to the tejasvi offspring. Only then the man must indulge into copulation, but not just to staisfy the burning Kama.
The best option here is to get intimate when the lady has completed her menses and before her 17-18th day of onset of menses(days may vary for every female)(viz are, 3 days from her ovulatory day). That's correct both by Shastra Pramana and science as till then the oocyte is still alive.
Well, a professional medical assistance would be best.
But, the stuff that masturbation gives space for better sperm quality in conceiving is funny.
Hope this helps.