Dogs will often groan or sigh when they flop on the floor after a long walk.

A healthy young Golden Retriever puppy sitting on a log outside
Most of the time they are groaning in delight or satisfaction, however sometimes they may be groaning because they are in pain.