Sleep quality is often considered a key dimension of good health, but the factors that affect it are still not fully understood.