It's a really weird phenomenon. I've had it maybe three or four times in my life, it would be interesting to try and encourage lucid dreaming because it was incredible when it did happen (the times I didn't just instantly wake from them).
Sadly I get sleep paralysis at least twice as often* as I have a lucid dream. Still quite rare, but it is really awful, the exact inverse of lucid dreams.
* At a guess, maybe twice a year. A friend of mine gets it about once a month, can't imagine having to deal with that.