Wow, that's kind of a strange case. I've seen dogs hyperextended, but never locked into hyperflexion. All the same, I think I know where to start.
The tongue tells the story, depicting a centralized congestion and reduced peripheral perfusion. The same peripheral circulation impairment will certainly contribute to degenerative changes in the extremities and persistence of chronic inflammation. In addition, poor circulation leads to increased tendency to spasticity, and possibly I would guess even tendon contracture.
Given that logic, and the simultaneous need for renal support, I'd go with Bu Gan Tang (Tonify the Liver Decoction). It stimulates the bone marrow to make more blood; supports optimal renal perfusion; counters renal hypertension; is antispasmodic; and will generally support peripheral circulation. It's also antioxidant, to help mitigate any chronic inflammation. As long as the animal doesn't have Damp symptoms (weight gains, obesity, yeast infections, severe dermatitis, colitis, etc.), it should be fine.
Physical therapies sound advisable, too. Perhaps at least ultrasound for the tendon contractures; and hydrotherapy. Is there anyone doing rehab you can refer to? Naturally, putting an acupuncture needle into any obvious areas of spasm is advisable.
Lastly, I'd also use homeopathic Rhus toxicodendron 30C twice daily. It is a major arthritis compound for dogs, and is also specific for the restless legs phenomenon you're seeing.
Good luck with the case, and let us know how it goes!
Steve