It depends on the size and density of the food, the size and quality of the cooler, external conditions, and any external heat sources you add to the cooler. Of course, any cooler, even styrofoam, is better than leaving food out in the cold.
What temperature is unsafe to sleep?
For most people, the temperature in the bedroom at night should not exceed 72 degrees Fahrenheit, and it should be even lower for people that sleep best in a cool bedroom.