Good news for all late night bingers out there who have difficulty resisting the hunger for BLT sandwiches and ice cream in the middle of the night. Researchers have uncovered the cause of the midnight snacking - it turns out its in your genes.

According to a study reported in the journal Cell Reports, noted that a faulty PER1 gene leads to the hunger pangs many people suffer from at night that leads to over-eating and eventual weight gain.

What is called "night eating syndrome" may actually be rooted in one's genetics. The tendency to snack at midnight has been traced to the PER1 gene which is responsible for managing sleeping and eating patterns.

In the study's press release, "We really never expected that we would be able to decouple the sleep-wake cycle and the eating cycle, especially with a simple mutation," shares senior study author Satchidananda Panda, an associate professor in Salk's Regulatory Biology Laboratory. "It opens up a whole lot of future questions about how these cycles are regulated."

Salk scientists teamed up with colleagues from Nanjing University to review the mutations in mice. Mice missing period genes were bred and then injected with human PER1 or PER2 with a mutation. The testing concluded that a faulty PER1 in mice leads to dysfunctional sleep-eating timelines with increased hunger during sleeping hours while a faulty PER2 results sleep defects including a more subdued, sleepy tendency.

"Panda and his colleagues hypothesise that normally, PER1 and PER2 are kept synchronised since they have identical phosphorylation sites -- they are turned on and off at the same times, keeping sleep and eating cycles aligned. But a mutation in one of the genes could break this link, and cause off-cycle eating or sleeping."

"For a long time, people discounted night eating syndrome as not real," continues Panda. "These results in mice suggest that it could actually be a genetic basis for the syndrome."

While human testing has not been conducted, the next step for the research is in the examination of "how PER1 controls appetite and eating behavior -- whether its molecular actions work through the liver, fat cells, brain or other organs."