Complete bro-science. Sex/masturbation will not effect testosterone levels or muscle gains.
You might be slightly tired after having intercourse (which is to be expect as it is a workout in itself), but besides that, it won't muscle gains or gym performance what so ever.