This image shows how you can vary the edge of the bed sex position by changing where your legs rest if you are the one being penetrated.
The partner being penetrated can either rest their feet on their partners' shoulders (as shown here) or, depending on comfort and height, put their legs right over their partners' shoulders.
The partner doing the penetration can grasp either the feet, thighs, or hips of the partner lying down.

