Synthetic fibres are hydrophobic, so body oils bind to the surface rather than washing out. Left overnight, the smell sets permanently.
The short answer
every wear
When to wash sooner
Wash it now if
- you sweated in it
- that is the whole list
What to do between washes
Nothing works. Do not leave it balled in a bag — that is how the odour becomes permanent within hours.
How to wash them
Cold, no fabric softener ever. For set-in smell, soak in one part white vinegar to four parts water for 30 minutes first.