I'd like to learn a song that requires extensive use of the middle pedal, but I have no experience using it. I think I'll just practice until it comes naturally, but I'd like to make sure I'm not getting into any bad habits. Is there a specific posture for your feet and ankles?
Use your right foot1 for the middle (sostenuto) pedal, since you wont need the damper pedal, but you might use the una corda pedal with your left foot.
The primary issue is keeping your heel grounded (i.e., on the floor) so you can use your ankle as a fulcrum. Keep the ball of your foot on the pedal so you have enough surface area to control it comfortably.
If only using one pedal, keep the other foot resting flat on the floor. I like to step out slightly to help balance evenly between my feet.
1There is disagreement on this. For example, jeffreychappell.com/pianist/articles/the-use-of-the-pedals and https://www.flowkey.com/en/piano-guide/piano-pedals#:~:text=Use%20your%20right%20foot%20for,how%20they%20alter%20the%20sound. both indicate using the left foot. On the other...foot..., Wikipedia says "Usually, the sostenuto pedal is played with the right foot." Similarly, https://coltharppianoworld.com/understanding-the-three-piano-foot-pedals/ says, "The middle pedal – the sostenuto pedal – is played with the right foot, yet is rarely used." Thus, the decision of which foot to use will ultimately rely on comfort (if no other pedal is simultaneously needed) or practicality (if another pedal is needed).
On the assumption that the middle pedal is indeed the sostenuto pedal - which sustains only the notes from the keys pressed at the same time as that pedal -
needing to press the sustain pedal during such pieces which require constant use of the sostenuto pedal is neligible. Thus, right foot will operate the middle pedal. Generally speaking, it is the foot more controllable, especially in right-handed people - maybe 85% of us. Leaving the left foot to operate the 'soft' pedal, more used maybe in pieces where sosteuto is needed rather than general sustain.
Heel on floor is usual for any of the pedals, so the toes are on the outer end of those pedals - giving greater control. Using ankle muscles more than leg muscles.