Every early morning, around 2 a.m., my sleeping partner wakes me up because she's thirsty and needs a bathroom break. Fortunately for her, she has no trouble going back to sleep. I know this because after her nightly ritual, I'm often wide awake, listening to her gentle snores.

My bed buddy is a dog. Like many dogs around the world, Maddie, a 13-year-old Shih Tzu, is a co-sleeper who shares her bed with a human.

Studies have estimated that about half of all pet owners allow their pets to sleep in the bed. And although the scientific literature makes a compelling case that our pets are good for us, research into the impacts of co-sleeping is more limited.

A small Mayo Clinic study of 40 adults used human and dog body monitors to measure whether having a dog in the bedroom or in the bed had an impact on sleep quality. The researchers measured sleep efficiency, which compares how many minutes you actually sleep after going to bed.

Everyone has brief periods where they wake up during the night, but they often don't even notice. Ideally, you'll stay asleep about 85% of the time you're in bed.

In the Mayo study, the sleep efficiency of people whose dogs slept in the room was about 83%. If a dog was sleeping on the bed, sleep efficiency dropped to about 80%, which is less than ideal but not bad. Although the difference was statistically meaningful, it translates to roughly 14 minutes of lost sleep for people who sleep with their dog compared with those who had their dog in the same room.

Once a dog experiences sleeping in bed with a human, it can be a hard habit to break, said Alexandra Horowitz, a professor at Barnard College and author of the book "Inside of a Dog: What Dogs See, Smell and Know."

"If you let them sleep on the bed with you, they're going to continue to want to because it's a nice place to sleep," Horowitz said.

But allowing your pet to sleep in the bed is only a problem if it causes you distress, Horowitz said. Although some people believe that letting a dog in your bed could lead to behavior issues in the pet, there's no evidence that co-sleeping creates problems, she said. In fact, it could lead to a stronger bond.

"I think it really came from this idea that dogs should be segregated from the best parts of the house — they shouldn't be in the kitchen, the dining room, on the couch or on the bed," Horowitz said. "For some reason, there is this sense that we have to maintain our dominance over them by having full possession of these things. It sounds ridiculous because it is ridiculous."

Horowitz said that when her dogs, Finnegan, a Lab mix, and Upton, a Great Dane-bloodhound mix, started crowding the bed, the solution in her house was not to kick them out, but to "expand the size of our bed."

"They're getting older, so they can't leap up onto the bed anymore," she said. "We actually have to lift them onto the bed. But it's the best place. It's a comfy place. It's where we are."

When Jamie Contreras and her husband, who live near Portland, Ore., got their bulldog mix puppy, Cooper, they planned for him to sleep in a crate next to the bed. But soon, the dog made it clear he wanted to be on the bed. As the dog got bigger, it became apparent there wasn't enough room for everybody — so the couple bought a king-size bed.

Now, nearly 12 years later, the 83-pound dog's nightly routine includes sleeping under the covers between Contreras and her husband. Sometimes, Cooper kicks and "runs" while dreaming.

"He's a big dog and he moves around a lot," Contreras said. "But I like having him there. It's a comfort. When we travel, it's almost hard to sleep not having him there. There are inconveniences to it, and it occasionally wakes you up, but the benefits outweigh that. I wouldn't have it any other way."