Lying down can cause inflammatory chemicals to pool in the fluid that cushions your joints, which makes them stiffen up. And your perception of pain may be heightened during the nighttime because you're not distracted by anything else.