Leftovers need prompt cooling, not a long wait until a deep pot reaches room temperature. Smaller, shallow portions lose heat more quickly and can go into the refrigerator while still warm. Plan the containers before serving a large batch.
Step by step
Divide food promptly
Set aside food you intend to keep and put it into clean shallow containers. Cut large cooked pieces into smaller portions where appropriate. Do not leave a large covered pot sitting for hours after the meal.
Refrigerate shallow portions
Put portions in a refrigerator at 4°C (40°F) or below, leaving room for cold air to circulate. Warm food can go directly into the fridge in suitable small containers. An ice-water bath around a container can help cool a large liquid batch quickly before refrigeration.
Keep track of time out of refrigeration
Refrigerate perishable leftovers within 2 hours, or within 1 hour if the surrounding temperature is above 32°C (90°F). These are maximum limits, not a target waiting period. Include serving time in your judgement.
Cover, label and use within the right period
Protect food from contamination and label its cooking date. Use properly chilled leftovers within 2 days, or sooner if the dish or product needs it; rice has a shorter limit. Freeze promptly if you will not eat the food in time.

Rice and food left out too long
Cool rice particularly quickly in shallow portions, ideally within 1 hour, rather than leaving it in the cooking pot. Refrigerate and use within 24 hours. Food can be unsafe without smelling spoiled. If perishable leftovers have exceeded the time limit, discard them; reheating does not reliably undo every hazard created during poor storage.

