He may have sprained a ligament or tendon somehow. Keep your rooster confined in the cage. You dont want him up walking or running around causing more severe injury than what he has. He needs rest and relaxation giving time for the injury to heal. You can purchase vitamin B complex tablets at a pharmacy, crush a few tablets into powder and sprinkle it over his feed to eat. Do this for 5 days. Then take him out of the cage and see if there's improvement. If not, put him back in the cage and continue with the vitamin B complex in his feed for 7 days. Then take him out again and see if he can stand or walk normally. These types of injuries take time to heal. It may take only a few days, a few weeks, or never. Normally there should be improvement in about 3 weeks. If not, you'd have to make a quality of life decision for your rooster.
My experience with these types of injuries is that there is usually an 85 to 90% successful healing process with hens. Not so good with roosters though, I've only had one that was partially successful.
Try to eliminate high places where birds can jump down and injure themselves. Consider lowering roosts inside the coop if they're too high. Good luck.