You can do this stretch either way shown. Pulling your knees toward your chest while laying on your back will be easier if your knees are stiff and sore.
Look and reach with your arm to one side and let your legs rotate to the other side. Repeat to the other side.
Depending on your flexibility you can go up on your elbows or push up onto your hands. As with all the stretches, you should feel a gentle pull but not pain.