Doing splits with one leg in front of you and one leg behind you requires flexibility in two major muscle groups. For the front leg, the hamstrings on the back of the leg are stretched in the splits. For the back leg, the splits challenge the hip flexors on the front of the hip.
For most people trying to do splits, the problem leg is the back leg. Because most people spent a considerable amount of time sitting down, their hip flexors become shortened. Short hip flexors make it difficult to descend all the way to the floor in a split and will cause you to bend your back leg. Stretching the hip flexors is the most effective way to be able to keep your legs straight in splits.
The lunge stretch effectively lengthens your hip flexors. Begin kneeling on the floor. Place your right foot flat on the ground in front of you, with your right knee bent. Move your right foot away from your body until you feel a stretch in the front of your left hip, keeping your knee over your toes. As you are stretching, engage your abdominals and keep your torso upright. If you bend your torso forward, you will not lengthen your hip flexors effectively. If this position is too difficult, you can place your right foot on an elevated surface, such as a chair or bench.
While the lunge stretch is an effective stretch for the hip flexors, you can alternate it with another hip flexor stretch to bring some variety to your flexibility training. Sit down on the floor and bend your right knee so that your foot comes toward your body and your knee moves out to the side, in line with your hip. Stretch your left leg out behind you. Keep your hips square, your torso upright and your back knee pointed toward the floor.
For some people, splits can take some time to do well. Be patient with yourself, and stretch consistently but never to the point of pain. If you concentrate on always performing your splits with good form, you will improve over time. Pay attention to the position of your upper body when you are descending into your split. Many people have a tendency to move their body weight over their front legs, reducing the stretch on the back leg. If you want to stretch your hip flexors, keep your torso as upright as possible. Always warm up with at least five or 10 minutes of light aerobic exercise before stretching.