In view of symptoms it looks like nerve
related. Two things which I can suggest are peripheral neuropathy
and pinched nerve at back of knee. I guess a clinical evaluation can help to confirm this.Had it been just muscle issue it would have not lasted for several hours.
You can try muscle relaxants to relieve the pain.