It will provide some benefit, but as a static hold, you will be training for a static position (general rule of thumb is that you improve what you train), the gluteus medius muscle is not the primary muscle being worked, the length of time you will need to hold it will increase to the point where it may not feasible to get much benefit, and improved technique will decrease your gains.
The one-leg stand works the glutes as a secondary area
[One-leg stand] is a calisthenics exercise that primarily targets the quads and to a lesser degree also targets the glutes, groin, hamstrings, hip flexors and outer thighs.
Static holds build muscle due to tension
During any static hold exercise you’re creating and, here’s the key word, sustaining tension in the muscle(s), says Luciani. “Increasing time under tension is going to increase muscle breakdown. More muscle breakdown means more muscle growth when those muscle fibers repair,” she says.
However, you do need active motion as well
Muscles need some movement to get stronger. So don’t go reneging your barbell back squats and shoulder-to-overheads for wall-sits and handstand holds. Still, “they’re part of the package,” says Seguia, “and used in conjunction with concentric and eccentric exercises they can help you get stronger and reduce the risk of injury.”
Importantly, the strength gain relies on muscle tension. As you improve your one-leg standing technique, your balance will improve, and you will naturally move to positions where you can stack your bones and joints such that you don't have to be under continuous muscular tension to stay up, which means you will be getting less of a workout. Unless you have a reason for the static hold to be best for you (perhaps you have a job where you will be standing for a longer period of time and moving from that position will hamper you, such as working at a standing desk), I would recommend using sit-to-one-leg-stand to better recruit a variety of muscles, and to keep the muscle under more constant exercise.
Try this exercise first on a firm chair or bench that is about hip height.
- Start seated on the chair with knees bent at 90 degrees and lift your left foot slightly off the ground.
- Lean slightly forward and drive your right foot into the ground, keeping weight in your mid-foot to heel. Exhale as you rise to standing. Aim to keep your foot, knee and hip aligned.
- From this single-leg stance, inhale as you slowly reverse the movement to return to a seated position. Avoid plopping and focus on maintaining foot, knee and hip alignment.
If you are working a task where you can't move as dynamically, you may try mixing going down and getting back up with a static hold at the top. That will give you a bit of the benefit of both exercises.