This could possibly be caused by a blood clot blocking the arteries to the rear legs of the cat.
I'd suggest you have the cat seen by a vet soon to see if that is the problem as if blood clots shift they could kill the cat.
It might be a spine injury too and a vet can also treat that. Whatever it is when you see a sudden change like this going to the vet is your best bet for your pet's safety and health.
Hope this helps you!
Please press Accept if you find my answer helpful. Want more info? Just reply on your question!
Bonuses for good work are always appreciated!
Thanks for the opportunity to help you!