Vein hypertension. You need an evaluation by a clinician that understands this disease process. Seek help from your internist , wound care physician, vascular surgeon etc.
Vein treatment. As dr. Vorhies said, compression is the mainstay of treatment for venous leg ulcedrs and for edema. As dr. Bolhack said, the problem is venous hypertension coming from blood not flowing properly in your leg veins. Compression helps to control the increased venous pressure and reduces the inflammation the pressure causes. It is important that you have a venous ultrasound and treatment.
Elevation/Compressio. Elevate legs above your heart when at rest. Blocks of wood under the foot of your bed. Compression stockings, 20-30mmhg gradient at all times whenever upright and off when laying down. See a vein specialist for further testing with ultrasound that can uncover the source of the problem.