You can pad these if you need to here. If this is too much extension, hyperextension in the knees, you can put a little blanket here between the knees, a little cushion.
At the same time, there are antagonist muscles that are working in reverse of that particular movement, by staying relaxed, or stretching, or contracting just enough to keep those prime movers from over-extending.