Many of your friends and neighbors are sleeping with someone other than their spouse. According to a recent survey by the American Pet Products Association, the majority of pet cats and nearly half of all pet dogs sleep in their owners’ beds.

“Co-sleeping” with pets usually causes few problems. But when pet owners are light sleepers…pets are restless at night…and/or pets act aggressively toward their bed partners, it can lead to a loss of sleep or other issues. Some pet owners who are chronically tired might not even realize that unsettled sleep as a result of having their pets in bed is what’s causing their fatigue.

To make these sleep arrangements work well…

Give your pet plenty of exercise in the evenings. A tired pet is less likely to be restless at night. This advice applies to cats as well as dogs—you can teach a cat to play fetch or use treats or toys to encourage him/her to run, jump or climb.

Caution: Do not give cats access to cat toys or treats containing catnip in the evening. Catnip can make it more difficult for cats to settle down.

Let your pet have a toy in bed. Some pets find it comforting to have a favorite toy in bed with them just as some young children find it easier to sleep with a favorite stuffed animal. This should be a soft toy that does not contain any bells or squeakers. The pet-toy-in-bed strategy does not work with all dogs and cats, however—remove the toy from the bedroom if nighttime access to it makes the pet more playful and active.

Teach your pet to stay on one particular part of the bed. Some dogs and many cats disrupt their human bedmates’ sleep by getting too close to their faces and/or positioning themselves between human partners. To train a dog or cat to stay on a specific part of the bed, such as near the foot of the bed, lie on the bed at times other than bedtime and invite the pet to join you. When the pet ventures onto the part of the bed where you would like him to sleep, click a clicker, available in pet stores (or say a positive word such as “yes”), and immediately give the pet a treat.

Alternative: If after a few weeks of this training, the pet still is not staying on his part of the bed, cut out a square of cloth large enough for the pet to curl up on. Place this piece of cloth on top of the bed’s blankets in the spot where you want the pet to sleep. Use the clicker/treat training technique described above to train the pet to associate positioning himself on this cloth with praise and food.

Ignore your pets when they try to get your attention in bed. Pets who sleep on beds sometimes wake their owners on purpose because they are bored, lonely or hungry. If your pet does this, do not speak to the pet, make eye contact with him or even pick up the animal to move him away—doing any of these things gives the animal the attention he craves, increasing the odds that this problematic behavior will be reinforced and continue.

Instead, ignore the pet when he wakes you intentionally. In fact, pay the pet as little attention as possible whenever you are in bed, at least after the bedroom lights are turned off.

Helpful: If your pet climbs on top of you while you are lying in bed, use the “earthquake technique” to dislodge him rather than picking him up or pushing him—roll from side to side until the animal figures out that this is not a comfortable place to relax.

If your pet gets right in your face while you lie in bed, turn so your face is right at the edge of the bed facing outward so the pet cannot position himself directly in front of you. You also can hide your head under the covers if you prefer.

Ignore a pet’s nighttime attention-seeking behavior consistently for a few weeks, and there’s a very good chance that he will stop bothering you.

Temporarily remove your pet from the bed if he acts aggressively toward an approaching bedmate. Pets sometimes growl or exhibit other signs of aggression when certain family members (or other pets) approach the bed. A pet might accept the presence of one spouse in the bed but growl at the other, for example.

To overcome this, do not allow the pet into the bed until after this person (or pet) already is in bed. In my experience, dogs and cats that show this sort of aggression generally do so only toward people who are approaching the bed. If these people are already in the bed, the pets usually accept their ­presence.

Meanwhile, use the clicker/treat training technique described above to teach your pet to get off the bed when told “off.” That way, if the pet does get on the bed before this person approaches, your pet can be instructed to temporarily vacate.

Warning: It is much more difficult, though not impossible, to modify the behavior of a pet that acts aggressively toward a person or pet who already is in the bed. The best solution with these pets often is to require them to sleep somewhere other than the bed.

Get the pet a baby bassinet if all else fails. If you want your pet to be close to you at night but letting him sleep in your bed proves too disruptive, purchase a baby bassinet that’s about the height of your bed and large enough for the animal, position this next to your bed, then use the clicker/treat training technique to encourage the pet to sleep in the bassinet. This form of co-sleeping provides most of the closeness and companionship of allowing the pet into the bed with significantly less potential for sleep disruption.

To learn about the benefits of sleeping with your pet, click here.