In much the same was as humans, resting dogs' respiration slows down, and they need an occasional extra boost of oxygen to maintain their vital systems, so they take a larger breath as a reflex action, and 'sigh' as they exhale.
Remember, too, that the behavioUr of dogs is different to that of people. When people sigh it is usually (albeit sometimes erroneously) taken as a sign of sadness. It is doubtful that, in dogs, it means anything of the kind. It is probably simply a reflex action as described in the previous answer.
really, Spellmaster, next you'll be saying that dogs don't dream or reason. And what's all that running stuff they do while sleeping? Next you'll be saying they don't see in color. Well pardon me Desmond morris.
Oh really xyzzplugh, don't be so stupid. I never suggested anything of the sort and you know it. Of course dogs dream. They certainly don't see in color unless they're in the USA, but they might well see in colour. If you read my answer properly, you'll see that all I said was that if a dog sighs, it does not necessarily mean that the dog is sad, because to make that interpretation would be to anthropomorphasise canine behaviour.