Good luck with getting back to better health.
Turned out, being so sedentary allows your muscles to shrink / weaken, and vexingly after a certain point the only thing to do from being in even worse pain was to power through some light exercise. It worked in so far as it staged off pain from atrophy.
As for restless legs, may I assume that your sleep schedule is very out of whack? I found that taking melatonin in an effort to get some more sleep was guaranteed to give me restless legs. I didn't put those two together until my wife tried some as well and suffered the same thing.
I have a habit of spending most waking time on a screen. The other night I laid in bed without a screen for 5 hours trying to fall asleep. The next day I had significantly more energy. My conclusion is that laptop/smartphone use takes a lot of energy. And today, I read that the brain is 20% of energy usage. Maybe visual processing is a big slice of that 20%?