i believe muscle spasms are very common after this surgery.  Aside my my thigh, whenever I overdo, I still get muscle spasms in my back and of all places, my shin

.  Your muscles have been though a lot and don't know what's going on.  They also tighten up when going into protection mode and they are screaming... what do we do
 
A good muscle relaxer may help in addition to or as your surgical pain subsides, instead of pain meds.
A little walking may also help rebuild those muscles slowly.
Good luck, Dale