Leg swelling could be related to inflammation in leg tissues, due to rheumatoid arthritis or another inflammatory disorder. It could also be associated with skin infections, uric acid, broken leg, Osteoarthritis and such others. You may try home remedies before considering to visit a doctor.
If you have significant lower leg swelling, then see a doctor. It can can any number of critical issues that you shouldn't be trying to resolve on your own. Blood clots can easily be generated in these circumstances and are very dangerous. See your doctor.
You will be ok but going forward do not sleep with tight-braces/compression/etc...maybe loose soft brace is ok. Wear zip-up compression socks to avoid damaging the valves of your veins during this extended period of low leg swelling and to help with circulation while sitting and standing. Elevate the legs and ice mid-day if possible. I have meniscal tear and struggle to walk...need surgery like you.