Why does my pet...?
Why does my dog circle before lying down?
Short answer: Nobody knows for sure; proposed ideas include flattening a bed, a last check of the surroundings, and settling into a warm curl. In a small informal test, dogs circled more on a lumpy surface than on a flat one. Gray wolves also turn and curl before resting, sometimes in deep snow.
Updated

In more detail
In a small informal test, dogs circled more on a lumpy surface than on a flat one.
The wild side
Gray wolves also turn and curl before resting, sometimes in deep snow with the tail over the nose.
Try this
Give your dog a bed with room to turn and to stretch out.
Read six other dog habits
Before the next walk, read the sniffing explanation in six other dog habits, free to read on this page. Circling is not one of those six; its cause is still uncertain. No email or purchase is needed to read the answers. Printing the free Letter or A4 mini-poster is optional.
See it in the episode
Why Dogs Spin Before Lying Down (Wild Cousins, episode 2)
Questions people ask
Why does my dog circle before lying down?
Nobody knows for sure. Proposed ideas include flattening a bed, a last check of the surroundings, and settling into a warm curl. In a small informal test, dogs circled more on a lumpy surface than on a flat one. If your dog suddenly circles much more than usual, struggles to settle, or seems stiff lying down, ask your vet.
Sources
If your dog suddenly circles much more than usual, struggles to settle, or seems stiff lying down, ask your vet.