Yes you can!
Wearing compression socks and stockings while you exercise will help increase circulation in the legs, which boosts oxygen and recovery time for muscles and tissue. But when you are done you’ll want to put on a clean pair of compression stockings and wash the ones you had exercised in.