Check your stirrup length
Get stirrups with metal cheese grater grips
Try stretching your legs and doing small warmups before you ride
Do some exercises out of the saddle to strengthen your legs - squats are a goodie!
It might be the kind of Stirups you have but also becuses you need to work with your leg muscles like doing no sturups
Keep your heels down and maintain a proper position (also maybe try leg exercises)
You need to keep your heels down. Something every equestrian must learn is how to maintain a steady seat and keep enough weight on their legs so they don't lose the stirrups. Maybe shorten them if you need to. A good tip of measurement is slipping your arm all the way up the saddle fender. If your hand is just touching where the fender and saddle meet, and the stirrup is right under your armpit comfortably, then you're good to go. If not, try adjusting a little. I hope this helped! 😉