Your body does this because it needs to spend the time you use sleeping to repair your body, cleanse the toxins, (which is only done when you are not digesting, because the same organs detox that digest and they can't do both at once) and rebuild your hormones levels for the next day. (it can't do any of this while digesting food) So try to eat something fibre-ous (or however you spell it) for dinner to make sure you stay fuller for longer as to not snack near bed time. I'm sure some of you may VIOLENTLY disagree with me, but using this has done wonders for my body, I do not have a quick metabolism and I eat like a pig and not always the best foods (until recently I started eating for proper body building) and I never put on a pound because my body has enough time even with a slow metabolism to get it all through. Digestive enzymes also help if you find it takes a long time for full digestions to take it's course!!