Ankle edema an important symptom for monitoring patients with chronic systematic diseases. It is an important indicator of onset or exacerbation of a variety of diseases that disturb cardiovascular, renal, or hepatic system such as heart, liver, and kidney failure, diabetes, etc. The current approaches toward edema assessment are conducted during clinical visits. In-clinic assessments, in addition to being burdensome and expensive, are sometimes not reliable and neglect important contextual factors such as patient's physical activity level and body posture. A novel wearable sensor, namely SmartSock, equipped with accelerometer and flexible stretch sensor embedded in clothing is presented. SmartSock is powered by advanced machine learning, signal processing, and correlation techniques to provide real-time, reliable, and context-rich information in remote settings. Our experiments on human subjects indicate high confidence in activity and posture recognition (with an accuracy of > 96%) as well as reliable edema quantification with intra-class correlation and Pearson correlation of 0.97.