The findings, published in the journal European Urology, were the result of researchers from Harvard and Boston medical schools and universities studying 31,925 healthy men, who completed a questionnaire about their ejaculation frequency back in 1992.
These same men, who were aged 20-to-29, 40-to-49, were monitored until 2010 and during that time 3,839 of them were diagnosed with prostate cancer.
The findings, being widely reported this week, compare the 21-timers with men who ejaculate just four-to-seven times every four weeks.
The researchers found that the risk of prostate cancer in men aged between 20 and 29 and 40 and 49 was significantly reduced if they ejaculated at least 21 times a month, whether through sex or masturbation.
This was compared with men who ejaculated just four-to-seven times a month.
The NHS says prostate cancer is the most common cancer in men in the UK, with over 40,000 new cases diagnosed every year.
However, the researchers are not speculating on the reasons why ejaculating reduces the risk of prostate cancer. It is being reported that previous research hints at the possibility that ejaculation contributes to getting rid of cancer-causing elements and infections from the gland.
Inflammation is a known cause of cancer, and ejaculation may help to ease this.
They wrote: "We found that men reporting higher compared to lower ejaculatory frequency in adulthood were less likely to be subsequently diagnosed with prostate cancer."
The study has been featured on the NHS website, which notes a range of other factors - such as genetics, lifestyle, number of children, diet, nature of sexual activity and education - may also contribute to prostate cancer risk.
However the NHS website also says: "Despite any lurid tales you may have heard growing up, masturbation is entirely safe.
"So if you want to do it as a preventative method, then it wouldn't pose any health risks."
Initial signs of prostate cancer usually involve problems with urination, such as needing to urinate more frequently, due to the prostate getting larger. While prostate enlargement can occur as men grow older, it is important to check symptoms like these with your GP.