Like any cooked food, spanakopita can sit at room temperature for a maximum of 2 hours. After that, it should be stored in an airtight container in the fridge for up to 3 days.