Here is a pic of her from yesterday lunging... the near rear leg is the one that locked up today.
Hi Hair! I'm sure Empress can answer you better, but here's my comment for what it's worth. My mare Truly did this, as did her mother. I was told that it was caused by the horse being "too straight in the stifle". From what I understand, a horse has 3 ligaments connecting the stifle joint together that run over the knee cap. The one in the middle is the one responsible for a horse being able to lock their knees and sleep standing up. Sometimes the conformation of the joint is such that this ligament engages when it shouldn't and the leg "locks up" just like you said. When it would happen to my mare, she would be trying to take a step and the effected leg would just hang out there behind her all stiff for a second or so, or she'd get this funny look on her face and you could tell she was trying to move it and all of a sudden that leg would jerk off the ground so fast that you'd think she was fixing to kick you, but she wasn't, she'd just gotten it unstuck, plus it would kinda pop when it happened. She also seemed to be uncomfortable while traveling down hill under saddle as well as when the farrier had that leg pulled up high over his knee to shoe her on the back. My vet recommended "clipping her stifle" which is when they cut that middle ligament. He did both of hers at the same time. He just made little quarter inch incisions over both knee caps, under anaesthesia of course, clipped the ligaments and closed with a single stitch and she's been fine ever since. The only drawback is she can't sleep standing up anymore.
Remember way back when I posted about that cutting horse that I saw at an auction that something would pop out when he raised his rear leg and went away when he stretched down? Beaker thought I might have seen a stiffle problem.