Good news, dog lovers: Letting your four-legged friend into the bedroom does not worsen your sleep, according to a new Mayo Clinic study—and it may actually help you rest easier. But before you cuddle up too close, know this: Researchers still caution against snoozing in the same bed.

The study, published in Mayo Clinic Proceedings, included 40 adults, all of whom slept with a dog either in their bed or elsewhere in their bedroom. Both humans and canines wore motion-tracking devices for seven nights, and humans answered questions about their quality of sleep and where their dogs spent the night.

The researchers found that having a dog in the bedroom did not necessarily compromise sleep quality, as had previously been suspected. On average, people with dogs in their rooms (but not on their beds) maintained 83% sleep efficiency—a comparison of time spent asleep to total time in bed. (80% is generally considered satisfactory.)