Actually, the insulation works both ways. The foil should be placed away from the roof metal, or it would be less effective in reflecting the radiant heat from the roof as Jon said. If choosing between fiberglass and bubble wrap, fiberglass is more effective (has a better R-value) for the same thickness, because the individual air spaces are smaller. Another option is closed cell foam, either foil lined or unlined. For sound insulation, heavier is better, and not in contact with either the inside or outside surface. That's why leaded blankets are sometimes use in high noise situations. The sound waves have a harder time moving the heavier blanket, when something lighter gets vibrated by the sound and becomes a speaker in effect.
This concludes today's lesson in heat transfer and sound transmission engineering.
