Boxer shorts are fineI need smother pants for this. But I believe you can wear underwear that doesn't constrict your penis.
Also depending on what kind of pants, they can also be constructive.
I washed my Jeans on 40 °C, should not have done that, they became really tight. 30°C are better for Jeans. They are going to be loose again soon.