Some dogs respond to stressful or exciting situations by mounting or masturbating. For instance, after meeting a new dog or person, an aroused and excited dog may mount another dog, his owner or a nearby object, like a dog bed or a toy. Compulsive Disorders Masturbating can become a compulsive habit, especially if a dog does it in response to stress.