You need to focus on the finer alignment of the vertebrae through core muscle groups, this will stabilize the posture and if they are aligned, the legs will naturally float up. The posture will be stable naturally if the base of the pose is stable and the base is made solid by elbows and shoulders. Try to bring closer the elbows than shoulder width apart and try to point upwards the lifted legs, feet inner thighs. Also check if there is no pressure on neck and this is relieved by pressing down through the upper arms and forearms. This finer readjustment will keep you in control. And once you feel stable and still and proper alignment, be aware of your breath that will keep you further still in posture.
If you need to explore further, please feel free to follow up.