Why do dogs circle before lying down?
It is probably a mix of inherited nesting behavior and simple comfort. Excessive circling or trouble settling can also signal pain or mobility problems.

What you need to know
That little pre-bedtime spin is usually normal. Veterinary behavior sources describe circling as an inherited nesting routine that may have helped wild canids flatten grass, check the surroundings, choose a position and regulate comfort before lying down. Modern dogs may still perform the sequence even on a perfectly soft bed. The important exception is when circling becomes excessive, looks painful, or is paired with repeated getting up, stiffness or trouble settling. Then it can be worth discussing with a veterinarian.
A common nesting/settling behavior
Comfort, environment checking and inherited behavior
Excessive or painful circling can warrant veterinary attention