There is actually a psychological phenomena where the brain thinks that a paralyzed/immobile appendage is immobile due to cramps. (It happens to paralyzed veterans a lot.)
The therapy for this is a mirror box where you exercise the other leg/hand/foot/arm, and it's mirror-reversed to trick your brain.
I'm not saying this is the source of the pain; I'm just throwing it out there as a possibility.
When does the cast come off?