That innocent midnight snack might be doing more than adding unwanted weight, as new research suggests that the bad habit could actually be doing damage to your brain, according to the Daily Mail.

Researchers at the University of California LosAngeles have conducted a study to see whether eating late at night not only cause weight gain and other health problems, but also affects the brain.

Lead author for the study, Dawn Loh, found that the hippocampus, "the part of the brain where memories are formed," takes damage when our body is busy trying to digest food as we sleep.

Using mice, the scientists were able to test their theory. They gave the lab mice food before they would normally fall asleep, and found that those mice were affected, having both their short and long term memory influenced negatively.

"For the first time, we have shown that simply adjusting the time when food is made available alters the molecular clock in the hippocampus and can alter the cognitive performance of mice," said Loh. "Since many people find themselves working or playing during times when they'd normally be asleep, it is important to know that this could dull some of the functions of the brain."