Sneaking out of bed to grab a midnight snack might translate into more missing teeth later in life, according to a new study.

The research marks the first to show that nocturnal eating can predict tooth loss among both men and women over time, even when controlling for factors such as age, education, smoking, diabetes, body mass, binge eating and carbohydrate consumption. The study focused specifically on adults over the age of 30.

"We hypothesize that consuming foods in the middle of the night, not brushing [or] flossing one's teeth after nocturnal ingestions, and reduced salivary flow during the night increase the risk of tooth loss in this sample," said researcher Jennifer Lundgren, a psychologist at the University of Missouri-Kansas City.

The researchers looked at 2,436 people who took part in a large Danish study and answered the question "Do you get up to eat at night" during a survey conducted from 1987 to 1988. The number of missing teeth came out during a second survey period of the same group from 1993 to 1994.

Night eaters had almost four more missing teeth than non-night eaters when the second time period rolled around, Lundgren pointed out.

Waking up to eat at night more than twice a week represents one of the criteria of night-eating syndrome, a relatively rare disorder that affects just 1.5 percent of the U.S. population. But a past study estimated that between 9 percent and 12 percent of U.S. adolescents and adults consume food after 11 p.m., even if they don't display the full-blown disorder.

People who eat at night and then don't brush their teeth could be especially at risk because of less saliva flow at night to help clean the teeth, researchers noted. Their study found a strong correlation rather than direct causation, because they did not measure salivary flow or oral hygiene in this particular study.

"It is unclear whether better oral hygiene alone can reduce risk of poor oral health, although it is probably a good start," Lundgren told LiveScience. "Persons who frequently engage in night eating (and who may be diagnosed with night-eating syndrome) can seek treatment."

The study also found other even stronger risk factors for tooth loss, such as having just a high-school education as opposed to the highest level of education, smoking, diabetes and age.

Future studies might focus on night eating among younger people and include more detailed questions about nocturnal eating habits, researchers said. They also cautioned that the results don’t apply to people with full-blown night-eating syndrome or binge-eating disorder, because their study did not assess people for those syndromes.

The results are detailed in the latest issue of the journal Eating Behaviors.