I guess I'm glad my dogs are never relaxed...LOL.
In animals the anal glands can be expressed voluntarily and are expressed to mark their territory. Dogs for the most part have lost the ability to express them voluntarily...so I am not certain whether your pets are voluntarily doing this...or it's just happening.
Most dogs glands are expressed when they have bowel movements. When they are unable to express them is when it causes a problem. Or perhaps when it's in your lap!