Many Pilates exercises begin sitting upright with straight legs and a straight spine (e.g., Saw, Spine Twist, Open Leg Rocker).
If either the back of your legs (hamstrings), hips, or low back is tight, you may have a hard time getting into this position.
Since the focus of Pilates is always the Powerhouse, try for a straight spine first rather than straight legs. By practicing pilates consistently, tightness in these areas should improve, making it easier to extend the legs when sitting.
Remember, it is always better to modify an exercise than to push through the exercise with bad form.