3
Since Jewish law allowed polygamy, David’s conduct in following what was reportedly a physician’s advice was blameless.

Wherefore his servants said to him
His physicians; so Joseph's physicians are called his servants, ([Reference Genes…

We have David sinking under infirmities. He was chastised for his recent sins, and felt the effects of his former toils and hardships.
Albert Barnes
AlbertBarnes