Could be a couple things. Could be an injury like a slipped disc, or it could be a spinal stroke (FCE), or perhaps just a severe muscle tweak. You could take him to the vet, but I’m not sure how they would diagnose spinal issues - MRI possibly? Scully, shortly before we lost her to kidney failure had an FCE but was starting to recover when she developed other issues, but it was diagnosed mostly by attempting to rule out other options. They might want to try him on some anti-inflammatories or steroids though. If he doesn’t seem to be in pain, your other option is to let him rest for a few days - help him around as needed to get out to relieve himself, etc, but otherwise keep him quiet and see if he shows any improvement with rest.
Sorry you are having to deal with this. I’m having similar issues with my almost 16 year old - he has had a series of seizures this week which has left him very weak, especially in his rear legs. He can’t get up on his own but with some help can at least walk a bit. He eats perfectly fine laying down though - we just put his bowl in front of him and he goes to town.