Yes, it is generally recommended that patients with prostatitis moderate their sexual activity while taking medication, but it is not absolutely prohibited. The specific approach should be adjusted according to the type of prostatitis and individual feelings.

1. **Stop treatment during acute attacks**

If you are in the acute inflammatory phase, accompanied by symptoms such as significant pain, fever, or difficulty urinating, your body needs rest. Temporarily avoiding sexual activity can help reduce prostate congestion and allow medication to work more effectively.
2. **Moderate exercise is possible during the chronic phase.**
For chronic prostatitis, if the condition is stable and there are no discomforts, moderate ejaculation may actually help to expel prostatic fluid and relieve local congestion. However, the frequency should not be too high, and should be limited to the point of not causing fatigue or worsening of symptoms.
3. **Pay attention to personal comfort and hygiene.**
If you experience increased pain or discomfort during the procedure, stop immediately and consult a doctor. Also, be sure to maintain good hygiene to avoid cross-infection or worsening of inflammation.
In general, the key is "moderation" and "observation." Please follow your doctor's medication instructions and adjust accordingly based on your own response. If you are unsure about the specific frequency or precautions, it is best to communicate directly with your doctor to obtain advice suitable for your individual situation.