Bodyweight knee flexion may look simple but it's one of the best hamstring exercises you can do. Excellent for adding both strength and mobility.
Hamstrings have two major functions in the lower body: extending the hips and flexing the knee. In the bodyweight knee flexion you first extend the hip by pulling the thigh back and then you flex the knee.
Knee flexion is one of the mobility drills of Movement 20XX program and although it's labeled as a "mobility drill", it's also a real strength builder (mobility is strength).
Knee flexion is considered an amazing mobility drill because you will learn how to maximally contract the hamstrings without the assistance of weights or machines. It's easy to do the exercise wrong but once you do it right, it is the best.
This exercise can be worked on multiple times per week preferably during or after your leg workout. 10 to 20 repetitions per leg is the optimal range. The repetitions need to be slow, controlled and you need to feel the hamstrings contract.
You can expect to see gains in strength, size and mobility of your hamstrings. It's likely that you will improve your squat form and pike flexibility thanks to the improved hamstrings mobility.
To also train the hamstrings' antagonist muscle, quadriceps, see the notorious sissy squat exercise.