not just when dieting, anytime
you are going to go to sleep, you're going to be lying and not doing much physical activity for 6-8 hours (I say not much because some of you might be sleepwalkers, jumper, kickers, etc...). If you eat carbs, most of it will be stored as fat because your body doesn't need it as a source of energy (because you're sleeping). Fats help slow down the digestion of protein so that your body has a nice steady supply through out the night (or whatever time you sleep). Your body will use the protein, fats, glycogen (stored "energy" source) and stored fat as energy to keep you alive and your body functioning while you sleep. By the time you wake up, your body is pretty much drained of "energy," this is when you want some carbs. Not eating before going to sleep will make your body use up muscle as an energy source, so don't go to sleep hungry.