There’s no specific treatment for growing pains. The good news is that growing pains don’t cause other problems, and they don’t affect growth. Growing pains often get better on their own within a year or two. And if they don’t go away completely in a year or so, they often become less painful.
https://www.mayoclinic.org/diseases-conditions/growing-pains/diagnosis-treatment/drc-20354353