As per your case, problem seems to be mechanical.
Mechanical pain refers to any pain caused by placing abnormal stress
and strain on muscles of the vertebral
column. Typically, mechanical pain results from bad habits, such as poor posture, poorly-designed seating and incorrect bending and lifting motions.
The habits can be autonomously corrected by maintaining proper posture, adapting proper lifting and bending techniques as well as the use of ergonomic chairs to alleviate back pain
. Take frequent breaks, get up and walk for sometime.If the pain persists, the pain may not be due to mechanical pain, indicating a more serious underlying back problem like sciatica
You have mentioned about ankles and calves becoming puffy. If that swelling is only due to continuous sitting or present throughout. In latter case, other systemic causes like heart and renal problems need to be ruled out.