The following three exercises will not only help to develop your swimming leg kick, but will also help to maintain your strength and stability.
Single leg balances
Standing on one leg, squeeze into your glutes and slowly raise your other leg behind you, bring it back down and raise it in front of you, back down and out to the side. Use a wall for support if needed initially. To increase the challenge try standing on a cushion.
With good upright posture, standing on one leg, lift your leg behind and complete five glute squeezes at the upper range of movement. Then lift the leg back and to the side at 45° and repeat the five squeezes. Next, lift the knee into a front high knee lift and back down. Finally, with your leg straight, toes pointed, draw a hip circle outwards from front to back and then back to front. This can all be done lying on your side with a mini band around your ankles to increase the resistance loading.
Step up into high knees
Stand in front of a bottom stair with a wall or banister for support. Place your right foot firmly on the first step. Step upwards with your left leg and keep lifting your leg into a high knee lift, hold and balance before stepping back down again. Focus on alignment and control rather than speed. Repeat x 5, change legs.