These will raise your blood sugar, delay sleep and raise your risk of acid reflux. Later, when blood sugar drops too low (hypoglycemia), you may wake up and be unable to fall back asleep.
Aside from that, eating too close to bedtime can harm your health in other ways. If you consume more calories than your body can immediately use, there will be an excess of free electrons, which back up inside your mitochondria. These electrons are highly reactive and start to leak out of the electron transport chain in the mitochondria.
These excess electrons wind up prematurely killing the mitochondria, and then wreak further havoc by damaging your cell membranes and contributing to DNA mutations. There’s compelling evidence to suggest this type of mitochondrial dysfunction is one of the keys to accelerated aging.1Sleep — Why You Need It and 50 Ways to Improve It