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.
It's normal to feel the hamstrings cramp in the beginning - this is a good sign because it means the muscles are not fully mobile and need to be worked on.
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.
Basic Knee Flexion
Move your upper thigh to a 45 degree angle by leaning a bit forward (you can use a wall for balance) and by activating the glutes. Keep the upper thigh stationary while you only flex from the knee.
The most important thing is to focus on slow and controlled execution where you really feel the hamstring muscles contract. The hardest part is to learn how to control the upper leg so you can only flex from the knee.
You can vary the angle of the thigh to change the stimulus of the exercise. Once you have fully flexed the knee, you can further try to pull the thigh backwards for increased stimulus.
It can be tempting to add ankle weights, but they are rarely needed even with the most advanced trainees. This is because the exercise mostly relies on learning how to contract the muscles - the resistance isn't the most important factor.
Inner - Outer Knee Flexion
The basic knee flexion will work amazingly well but once you get more proficient at it, you can start targeting different parts of the hamstrings by changing the rotation of the thigh.
Rotating the leg inwards (internal rotation of the hip) will allow you to target the inner parts of the hamstrings.
Rotating the leg outwards (external rotation of the hip) emphasizes more the outer parts of the hamstrings.
You will get the best results when you work all parts of the hamstrings by doing basic (neutral) knee flexions and both internal and external rotated knee flexions.
The same rules apply here: contracting the muscles (feeling the muscles burn) is the goal and it's achieved with mind-muscle connection and slow & controlled tempo.