You can eat cooked rice that was left out overnight as long as the rice has no mold growth on it and doesn't smell bad.
Most cooked rice can remain safe to eat if it's been left out only one night but if the cooked rice was left out longer than one night you should throw it out.
You can reheat the rice by adding some water to it and microwaving it for 1 minute or until heated.
You can eat 5 day old leftovers as long as the leftovers are still actually good and has no bad smell, mold or bad taste.
If the 5 day old leftovers were kept refrigerated then they are often safe to eat depending on what type of food it is.
If frozen the 5 day old leftovers are still very safe to eat and can even be good up to a year frozen.
Raw meats tend to last 3 days in the refrigerator and a year or longer in the freezer.
For cooked meats the cooked meats tend to last 5 to 7 days in the refrigerator before going bad.
And other cooked foods such as spaghetti, noodles, pizza etc tend to last a week or 7 to 10 days as well.
Just make sure the 5 day old leftovers or other leftovers still smell good and have no mold growth or slimy texture and they will be safe to eat.
If you're in doubt then it's best to throw the leftovers out.
But most leftovers last 5 days or longer and are often safe to eat depending on the food type.
I keep many leftovers for 5 days to 10 days in the refrigerator and have eaten them after that time but if I plan to keep any leftovers longer than 5 to 10 days I freeze them to make them last longer.