بسم الله الرحمن الرحيم
When there is neither any stain nor any bad smell then it is probable that this is sweat as you also think; hence in the question mentioned above, it is not necessary to wash the underwear. Your salah will also be valid if you offer your salah wearing the underwear without washing it.
Allah knows Best!
Darul Uloom Deoband
This answer was collected from the official ifta website of Darul Uloom Deoband in India.