Good explanation, Neil.
If the sleeping bag touches the foil, then heat is lost through conduction, negating the effectiveness of the foil. If there is an air gap, then conduction cannot occur, and the foil will reflect say 95% of the heat back (there will also be losses by convection within the air gap, but these will be minimal).
Having said that, the sleeping bag will not make perfect contact with the foil, so it will be of some benefit. Indeed, some foam mats have a layer of foil on one side.