The symptoms you are describing can be either its arterial insufficiency known as claudication or it may be due to disc herniation in your lumbar region or lumber strain or spinal stenosis, may be a DVT or muscular pain due to improper positioning while sitting for long periods.
For arterial insufficiency along with pain in leg while walking pain disappears while at rest, skin changes on leg like disappearance of hair or nail changes on foot are seen. For diagnosis ankle brachial index, doppler ultrasound of leg, last test if required after doppler is angiography.
Disc herniation or lumber strain very common has back pain and pain radiates into the leg might worsen while walking, but no skin or hair or nail changes. pain increases with back flexion and relieved by back extension. Do a straight leg raising test and get a back x ray, for confirmed diagnosis MRI lumber spine screening protocol.
Spinal stenosis pain in legs which is aggravated with walking improved with rest very similar to claudication. Pain relievedif person walks with back flexed like pushing a grocery trolley cart or while cycling and pain increased with back extension. Only one test for diagnosis MRI lumbar spine screening protocol.
DVT is in my differential diagnosis because most important thing in your history is prolong sitting. To test it doppler ultrasound or compression ultrasound.
Most likely my diagnosis in your case would be lumber strain or disc herniation or muscular strain due to improper positioning. Treatment if lumber strain or disc herniation is the cause, will be, sleep on a flat hard bed like a piece of cardboard or floor for 2 weeks, avoid lifting heavy weights, medicines if you like diclofenac for pain relief and a muscle relaxant like anyone (tizanidine, baclofen or orphenadrine + paracetamol). You can also buy a lumber corset for spine stabilization.
It is highly unlikely on your symptoms to be rheumatoid arthritis(RA) but if you want to get tested get a rheumatoid factor(RF) but it is highly unspecific test most accurate for RA is anti cyclic citrullinated peptide(anti CCP).
Highly unlikely your ankle twisting history is causing this, symptoms you are telling are of lumber spine and RA rarely affects lumber spine, as I said your prolonged sitting with improper positioning will be causing it.