Severe leg edema is usually the result of an underlying medical condition such as heart failure or kidney failure. Treating the underlying medical condition can prevent future problems with edema.