"The vastus medialis is better recruited with terminal knee extension and any movements that send the knee into valgus. Likewise, anecdotally, knee extension exercises from positions of great knee flexion (e.g. deep squats, lunges, and step-ups) preferentially recruit the vastus medialis. This could result from increased activity of the adductor magnus - which also works as a hip extensor ? to assist in hip extension from the low position.
Research has shown that because the vastus medialis oblique originates on the adductor magnus tendon, increasing adductor magnus activity will enhance vastus medialis recruitment. This is the premise behind many physical therapists recommending straight leg raises with the knee extended and femur adducted to strengthen the vastus medialis; unfortunately, this rehabilitation model isn't functional at all, and therefore doesn't have much value beyond the initial stages of rehabilitation."
Don't take my word for. It's Eric Cressey on another site.