Hadith.153 - Zayd al-Shahham asked Imam Jafar ibn Muhammad Al-Sadiq عليه السلام about a garment that has janabah (ritual impurity due to seminal discharge) and is then rained on, causing it to become wet while he is wearing it.
Imam عليه السلام said: 'There is no harm in it.'
If a man sleeps on a bed that has been affected by semen and then sweats on it, there is no issue with that either.
If a person sweats in their garment while in a state of janabah, they may dry themselves with it after performing the ritual bath (ghusl). If the janabah occurred through permissible means, it is permissible to pray in that garment; if it was from impermissible (forbidden) means, then it is impermissible to pray in it. If a menstruating woman sweats in a garment, there is no issue with praying in that garment.