I had this and my children do. In our case it's due to the muscles/ tendons not keeping up with growth spurts. We were told to do an excercise : Stand in front of a wall with your arms straight and your feet directly in line. Bend your arms, keeping your feet still, until you feel a gentle pull on the back of your legs. ( calf muscles) If she does this every morning on getting up should help.
My did complains often of pain in her legs. We have been to the docs a few times all I seem to get is a diagnosis of growing pains. Should I trust what the gp is telling me mothers instinct tells me different??