It may be because of tightening and weakness of hamstring and calf muscles. U need to do stretching and strengthening of these muscles for that visit physiotherapist.
Next Steps
Hot fomentation at back of knee and shin with excercises.
Health Tips
Avoid running and brisk walk untill it cures.