I have diverticulosis. Why is it only painful while laying down?

Not the cause. Diverticulosis in and of itself is not painful. It is a benign condition, very common in the american population, and is associated with our lower fibre, higher fat diet. Now, if the diverticuli become inflamed (diverticulitis), then pain and fever are associated. I suspect your pain upon reclining is due to something else. Discuss with your doctor. Good luck.
See a doctor. Diverticulosis shouldn't hurt. If there's an infection there, called diverticulITIS, then there could be pain but then you'd need an evaluation and antibiotics. See a doctor soon.