Much of the value of my year practicing with an end-weighted staff was that it forced my attention onto my feet, because it was so heavy that the force required to put it into motion or stop it would cause my feet to slip, unless planted firmly, and the awareness that force was being transmitted between my feet and my hands sensitized me to every link in that chain, beginning with the alignment of the balls of the feet, ankles, knees, and hips.
The strongest arrangement is for all four to be in a single plane, but the best approach is to maintain an approximation of that alignment dynamically, having stretched so that both ankles and knees can safely range well out of the plane without tearing ligaments, and having built the muscular strength to recenter them.
With the ankles flexibility is usually not so much the issue as the strength to prevent overextension (a sprain). Standing on the balls of your feet and moving the ankles a very short distance in all directions is a good way to begin. As with everything else, be careful not to overdo it.
The classic horse stance builds both flexibility and strength for letting the knees range to the outside of the center plane, and, in its most extreme form, also for the ankles. Kneeling with your knees together and your feet spread and turned outward (without trying to force them flat), and then sitting back between your feet, is an approximate inverse of the horse stance, but be very careful with this as it's easy to go too far too soon. It's best to position a chair on either side so you can support yourself with your arms if needed and/or a large pillow in front so you can escape by rolling forward with your upper torso. Go slow and stop as soon as it begins to burn. Alternatively, you can stand with your feet spread and very slowly move your knees closer together, until they begin to shake, then move them back to center alignment or a bit further out, rest for a minute, repeating a few times, or until the shaking starts as soon as you move your knees inside of center alignment.
The deeper the horse stance (or inverse), the more effective it is, but before going deeper make sure you can sit with your torso erect where you are. The tendency is to lean forward, and rolling forward is the way to escape if you go too far. Best to practice initially facing a bed or something else you can safely fall onto.