I’m not 100% sure where this came from or what research study was cited as the original to say this, but the theory goes like this, eating carbohydrates aka. sugar causes your insulin to go up and if your glycogen stores are full, which they are all the time in most people, excluding very athletic individuals, then this gets stored as fat on your body. The theory is this, if you go to bed after consuming these sugars, then you go to bed with high blood sugar which means your body is much more likely to store it as fat because you’re not moving.