A gardener sleeps on the grass during the last preparations of the yearly German horticultural show 'Bundesgartenschau 2011' in Koblenz April 7, 2011. Reuters

Those extra Zs might mean extra LBs. A University of Glasgow study focusing on people with a genetic predisposition toward obesity found that too much sleep, or too little sleep, increased the chance of being heavier. The research, published in the American Journal of Clinical Nutrition, looked at 120,000 patients and tracked their sleep habits.

Those patients who got nine or more hours of sleep — more than the typical recommendation of eight hours — were about 8.82 pounds heavier. But those who got fewer than seven hours of sleep also were about 4.41 pounds heavier than those who slept about eight hours per night.

Read: Try Tom Brady's Diet With A $78 Meal Kit

The effects of abnormal sleep "happened irrespective of diet, health concerns or socio-demographic factors," the researchers noted. But folks who aren't genetically at risk for obesity have less to worry about when it comes to weight gain and sleep patterns.

"These data show that in people with high genetic risk for obesity, sleeping for too short or too long a time, napping during the day, and shift work appears to have a fairly substantial adverse influence on bodyweight," Dr. Jason Gill, researcher from Glasgow University's Institute of Cardiovascular and Medical Sciences, said in a statement. "However, the influence of adverse sleep characteristics on bodyweight is much smaller in those with low genetic obesity risk — these people appear to be able to 'get away' with poorer sleep habits to some extent."

Read: Too Much Rest Could Be A Problem For Older Adults, Study Finds

Too much sleep has been shown to cause other problems. A study published in February, for instance, showed that older adults who began sleeping nine hours or more had a higher risk of dementia.

The National Sleep Foundation recommends adults aged 18-64 get seven to nine hours per night. Adults 65 and older should get seven to eight hours of sleep, while kids and teenagers should skew toward getting more rest.