Sorry to say but no. I had this idea and didn't work. If you google "is Styrofoam Ok For Hood" you will find out that Styrofoam has around 20 toxic subtenants in it which if burnt can kill you. So if the Styrofoam ever got hot and burnt then you would have problems. Also if you burn a little bit of Styrofoam out side you will notice it " cherry drops" which would drop burning styrofoam into your tank. So the answer is no. I bought a 12ft bit of Styrofoam and i put 6ft under my tank and was gonna use the other 6ft to make a lid but didn't work the way i planned
Here is a link
http
/wiki.answers.com/Q/Are_the_fumes_of_burning_Styrofoam_poisonous
When burned Polystyrene (styrofoam is expanded polystyrene) produces polycyclic aromatic hydrocarbons (causes cancer) carbon soot (also can cause cancer) and carbon monoxide which is poisonous.
Also please remember carbon monoxide you can not see so if it started burning in the middle of the night the carbon monoxide it makes could kill.
Im guessing if you did not have any heat has in lights etc under the foam or near the foam it could be fine but then again i wouldn't take the risk.