Knock knees (or knocked knees as some people call it) is the common term for genu valgum or knee valgus. If knock knees is not something you’ve always had, it might be coming from flat or weak feet, weak quads, or tight adductors & hip internal rotators. If that’s the case, these stretches & exercises may help.
One way to help strengthen the area is to do squats while making sure you are not bringing your knees together. If you bring your feet closer together, this can help prevent your knees from coming inward.
Next, working on your peroneal or fibular muscles is a great way to loosen up the area in between your knees and feet.
Ankle strengthening with or without a resistive band is also a great way to strengthen your feet and ankles. Ankle eversion and inversion are the best ones to work on.
Then working on your hips by doing side planks either modified or in a full position, and clamshells with or without a ball at your feet will help correct some weak and tight areas at the hips.
Finally, getting into a hooklying position and using a resistive band, doing leg or hip roll outs is a great way to strengthen your hips