Masturbation is a healthy activity so long as it does not interfere with or take away from intercourse or the sexual relationship.  The male body is built to ejaculate about twice a week on average, so it is healthy for a male to masturbate if intercourse frequency is irregular or infrequent for other reasons.  The optimal sperm quality is seen with ejaculation frequency of 2-3 times per week.  The sperm are coming off an assembly line, with the total transit time of around 74 days, and then when they get near the finish line at the prostate they wait their turn for each ejaculation.  More frequent ejaculations than 2-3 per week can result in diluted semen with less sperm, and more infrequent ejaculations can result in lower motility and lower quality sperm.  Studies show the optimal ejaculation frequency for sperm quality when a couple is trying to conceive is around 2 days.  During the female partner’s fertile window, intercourse about every other day is best.  Masturbation during this time period should be avoided if possible as it can take away from the chances to conceive during that cycle.