In headstand yoga pose, particularly bound headstand, which is a fairly common inverted yoga pose, the elbows and hands form a triangle shape.
If the elbows are too wide then we lose the triangle shape and the foundation becomes more of straight line, offering as much stability as standing on a single skate.
If the elbows are about shoulder width apart then the triangle forms a base that potentially gives the pose stability both in the front to back direction (longitudinal) as well as the left/right direction (transverse.) I say potentially because just configuring the head and arms in a triangle shape isn't enough to balance in this pose.
To stay balanced in this pose the elbows have to press down into the floor.
What creates the pushing force that drives the elbows into the floor?
To improve balance in headstand (or to be able to get up into headstand in the first place) one of the exercises that I have my students practice is moving the shoulder blades outwards and inwards while standing upright with hands clasped behind their head.
Because its the shoulders that press the elbows into the floor when doing headstand yoga pose.
In this exercise, moving the shoulder blades outwards (protraction) will cause the elbows to lift while moving the shoulder blades inwards (retraction) will cause the elbows to lower.
Upside down in bound headstand, to increase the downward pressure of the elbows, spread the shoulder blades. The muscle that causes protraction is the serratus anterior muscle. And in headstand this muscle works against the weight of the body to help stabilize it.
Pressing the elbows downwards with just enough pressure, your can keep your center of gravity over your foundation.
If your weight shifts forwards then increase elbow pressure to push your body backwards. If you feel your center going the other way, and if you respond early enough, then letting the shoulder blades move towards each other, you can reduce elbow pressure enough that your weight shift forwards enough to stay balanced.
Note that neck tension is also important in headstand in order to keep the neck safe.
Rather than working against the weight of the body, the muscles of the neck work against each other to keep the neck stable.
Now with the hands clasped behind the head in such a way that the sides of the palms are also on the floor, if you find your weight shifting back then you may be able to use hand pressure to push your center of gravity forwards. In this case it is the triceps muscle (at the back of the upper arm) that is used to increase tension.
In either case, the more you feel your connection with the earth and the more you use it, the easier it is to work at staying balanced while doing headstand yoga pose.
How to Do a Headstand includes step-by-step sequence of exercises to get you ready for this inverted yoga pose.
So how do you stay balanced while lifting up into yoga headstand with legs straight? It helps to understand that the legs have weight. As you lift them to horizontal they are going to tip you in one direction. So you need to move your hips in the opposite direction to stay balanced.
So that you know how far back to move your hips it helps if you focus on feeling your foundation.