Squad with one leg and stretch the other one to the side and then to the fronT.
Before I start riding, I will stand up in my stirrups and put my weight down. It really helps stretch my thighs!
Do lots of stretching exercises after your done riding your horse and before...
I have often sore muscles and the thing that helps the most is stretching right after you rode. It'll help your muscles relax. I normally come home or stay at the barn and try to stretch (being seated and trying to do a split for example). Taking a shower also helps. Good luck.
I agree with Martina saying that practising an other sport could help stregthen your legs.
You should also dome some warm up exercises before riding and then some stretching.
Drink a lot of water several times during the session, it really helps with sore muscles.
Good luck :)
I heard that if you dont want to get sore the next day you should change the temperature of water from really cold to hot while you're taking a shower. I dont know if its true but maybe it will help you :) anyway to avoid soreness you can try thighs exercises (there are many of them on for ex. YouTube) so your thighs will become stronger :)