Yoga pants are made of a lightweight and stretchy material, which makes them perfect for swimming. However, they may not be as durable as traditional swimwear. If you do choose to swim in yoga pants, make sure to avoid wearing them on days when the weather is cold or windy.