Lie on your belly on a firm surface like a table, supporting the thigh but allowing the limb to hang from above the knee. The limb's weight provides the stretch.
If you need to, you can use the other leg to assist with the stretch.
How to Rapidly Abolish Knee Extension Deficit After Injury or Surgery: A Practice-Changing Video Pearl From the Scientific Anterior Cruciate Ligament Network International (SANTI) Study Group. Delaloye J-R, Murar J, González Sánchez M, Saithna A, Ouanezar H, Thaunat M, Dutra Vieira T and Sonnery-Cottet B. Arthrosc Tech. 2018 Jun; 7(6): e601–e605.
See also -