This technique comes from the book The Vertical Jump: Advanced Speed And Strength Methods by Joe DeFranco (sorry, I don’t know where you can but the book) and also The Jump Manual. It’s one way that you can instantly improve your vertical jump performance by 1-2 inches, so it is a great stretch to do before a basketball or volleyball game (and in half-time too) or a fitness test.
The logic is that when you jump, your body needs to extend fully, but the hip flexors resist this extension, slowing your jump down. Usually you would not do static stretches before a sport requiring maximum power, but in this case the hip flexors don’t contribute to the vertical jump, but instead detract from it, so it’s recommended.
I have tried the stretching technique myself and noticed an immediate improvement. You too can test it in a couple of minutes by vertical jumping against a wall with some chalk to record your jump height. Do a pre-stretch jump or two, then static stretch your hip flexors (as shown below) for 30-60 seconds and jump again. Your jump should be higher.
Spend a few minutes to test the technique to prove it to yourself, then start doing it when you need to jump high. It’s so quick an effective that it would be crazy to pass up. The technique could possibly apply to sprinting too at the body straightens at the leg is pushed back, but you should check some research to verify that hypothesis as the hip flexors also play a part in raising the knee.