The hamstrings are extensor muscles that cross and act upon both the hip joint and the knee joint. Two of the three hamstrings (semitendinosus and semimembranosus) extend the hip when the trunk is fixed; they also flex the knee and rotate the lower leg when the knee is bent.
The third of the hamstring muscles (biceps femoris) has two heads. One helps to extend the hip when we begin to walk, while both heads flex the knee and laterally (outwardly) rotate the lower leg when the knee is bent.
The hamstrings work together with the quadriceps to balance the flexion and extension needs of the upper leg. In urdhva danurasana, upward facing bow, or wheel pose, the hamstrings are extending the hips trying to counteract excessive use of the quadriceps.
This is where the feet come in. Grounded feet are my marker to know if someone is doing wheel pose correctly. A key to backbending especially wheel, is internal rotation of the inner upper thigh. You need to be grounded through the inner and outer foot equally for this to happen.
There are two main legs extensors at work when we head up into wheel – the hamstrings and gluteus maximus. Ideally the hamstrings do most of the work of extension in the pose because they will allow access for the needed internal rotation. Too much use of the gluteus maximus, this is where the feet come in, can lead external rotation.
Where the hamstrings run down the leg to attach to the shin, the gluteus maximus has a portion that attaches to the IT band which leads to the outside of the leg. If you use gluteus maximus too much it will draw the knees out to the side which is one of my main red flags when it comes to backbending and back pain.
A lot of people get up through reliance on the quadriceps which use too much power and not enough grace. If the feet stay grounded, you will not overuse the quadriceps—the hamstrings will be able to truly extend without any external rotation— which, in turn, allows for the inner thighs (adductor magnus mostly) to go to work.
The main ingredient for pain free backbending is slow motion. If you move slowly you will stay grounded through the feet and the rest of the body. Moving slowly through wheel encourages the best possible use of the hamstring muscles in the pose.  I’ll have a post about excessive thrust in wheel sometime in the future.