The first escape starts when the person is settling into the position but hasn't quite established modified kesa just yet. Ideally, start in head and arm side control, and have your partner work on switching their hips right as you bring your near-side elbow in to make a frame.

As your partner switches their hips, grab the backs of both of your knees (if you can't reach your knees, you can grab your gi pants, although the back of your knees is better). Now use your own momentum to rock and then kick your legs back, operating them both as one unit.

It's entirely possible that you will catch your opponent off guard here and get a simple reversal, ending up on top in your own modified kesa position. However, if your partner begins to switch back to head and arm side control (an appropriate course of action to shut down the situp escape), you can use the space you've created between you and the mat to post and remain sitting up, just for long enough to hip out and recover guard. I call the second option the "rowboat escape" because you are going to row with both arms in order to square back up with your partner.