Thank you for your query on Healthcare Magic.
Sore legs may be due to excessive running or exercising.
But some viral infections like myositis
will cause muscle inflammation
leading to pain in muscles, inability to walk, and limping.
Growing pains usually present during night and with gentle massage
Ask him to take rest and give plenty of oral fluids.
Consult the pediatrician
for examination and investigations.
Hope I have answered your query.