You can store unhusked sweet corn in the refrigerator for about 2 days without putting them in a plastic bag.
If the ears of corn are already husked, wrap them loosely in a plastic bag and store in the refrigerator for no more than 2 days.
Once corn is cooked, you can store it in the refrigerator either on or off the cob, in an airtight container, plastic bag, or tightly wrapped in plastic wrap. The cooked corn should last for 3 to 5 days when stored properly in the refrigerator.