My legs started swelling pretty bad around week 28. Someone recommended compression socks and they work amazing to take down the swelling. They take like 10 minutes to put on and sometimes pinch and make your legs tingly, but definitely help with the swelling - good luck!
I'm 34 weeks but haven't swelled, so I'm not speaking from first hand experience. However, my sister just had her baby a week ago and she started swelling up really bad by week 31. She is a coach and is on her feet all day, with what she went through i suggest calling your doctor, tell her your problem and they will most likely call you to go in and see you that day or asap..instead of going to the ER and getting a big bill. Until you see your doc keep your legs elevated on pillows and stay off them as much as you possibly can. Good luck!