If you plan to eat the corn within four to six hours, it can sit out on the counter. This is perfect for a spontaneous backyard barbecue. Just keep it out of direct sunlight, and don’t stack the ears in a hot, airless pile.
But be warned: corn left at room temperature loses sweetness at a dramatically faster rate. After eight hours, you might as well be chewing on cardboard. The fridge is always the safer bet for anything beyond a quick dinner.