Wiki source

The neurons for voluntary thigh contraction originate near the summit of the medial side of the precentral gyrus (the primary motor area of the brain). These neurons send a nerve signal that is carried by the corticospinal tract down the brainstem and spinal cord. The signal starts with the upper motor neurons carrying the signal from the precentral gyrus down through the internal capsule, through the cerebral peduncle, and into the medulla. In the medullary pyramid, the corticospinal tract decussates and becomes the lateral corticospinal tract. The nerve signal will continue down the lateral corticospinal tract until it reaches spinal nerve L4. At this point, the nerve signal will synapse from the upper motor neurons to the lower motor neurons. The signal will travel through the anterior root of L4 and into the anterior rami of the L4 nerve, leaving the spinal cord through the lumbar plexus. The posterior division of the L4 root is the Femoral nerve. The femoral nerve innervates the quadriceps femoris, a fourth of which is the rectus femoris. When the rectus femoris receives the signal that has traveled all the way from the medial side of the precentral gyrus, it contracts, extending the knee and flexing the thigh at the hip.