And the root of it all - laziness.
He rose from his bed in the evening - which to me, meant he’d been laying about all day. He also, as king, should have been on the front line of the war effort, but he was home instead.
Idle hands being the devil’s work, and all that...
The Bible commentaries on this chapter have made that point. When David was young he went into battle with his men. In those days, the king was expected to lead in battle or to at least be with the troops. Once he achieved power, David chose to stay in Jerusalem while sending his troops out to battle. Everything old is new again.