SAN FRANCISCO (CBS SF) – With cold season around the corner, a new study led by a University of California San Francisco sleep researcher says getting a good night sleep, preferably seven hours or more, is crucial to avoid getting sick.

Researchers at UCSF, Carnegie Mellon University and the University of Pittsburgh Medical Center studied more than 160 volunteers for the study. Volunteers were sequestered in a hotel, exposed to the cold virus and were monitored for a week.

READ MORE: Newsom Unveils State's COVID Recovery Plan; $75B Budget Surplus To Provide For Direct Payments

The researchers found the volunteers who slept less than six hours a night were 4.2 times more likely to catch the cold, compared to subjects who slept more than seven hours a night. Subjects who slept less than five hours a night were 4.5 times more likely.

UCSF assistant professor of psychiatry Aric Prather was the lead author of the study.

READ MORE: South Lake Tahoe Boat Ramp Closed Due To Low Water Levels After Dry Winter

“It didn’t matter how old people were, their stress levels, their race, education or income. It didn’t matter if they were a smoker. With all those things taken into account, statistically sleep still carried the day,” Prather said in a university statement.

The National Sleep Foundation recommends adults get 7-9 hours of sleep a night.

MORE NEWS: Bonta Among 44 Attorneys General Telling Facebook To Drop Instagram For Kids Proposal

The study appears in the September issue of the journal Sleep.