Is it bad to engage in sexual intercourse or masturbation before a major sports competition?

No. It based on superstition and anecdote. Studies have shown no physical effect. Some coaches use it to keep athletes focused on the competition. There have not been any studies on psychological effects. Treat sex as you would exercise in your training program. Until there are further studies, to have or not to have is an individual decision.
No. Athletic coaches may encourage athletes not to have sex, simply because a problem relationship seriously detracts from a person's athletic performance.
No. Although a topic of speculation for years, there are no well done studies on the effect of masturbation or sexual intercourse and athletic performance.