Although many insulating materials are fire resistant, most of the plastic-type foam products, be they injected as foam or installed in rigid sheets are flammable and must be covered with fire protective materials when they are inside the house exposed to a living space. 12 mm (1/2 in.) drywall is the standard cover, although 6mm (1/4 in) masonite-type prefinished panels comply with the code. (Some specially treated plywood-type pre-finish panels comply also, but are not commonly found in stores.)
Assume any plastic to be a fire problem unless a specific flame spread rating is printed right on it.
If you want to put insulating panels in your windows at night you can legally get away with exposed foam panels; they do not fall under the building code because they are not a structural part of the house. However, please be aware that you are creating a fire hazard, especially above heater outlets.