If he's otherwise eating fine and not exhibiting any odd behaviors, it may be too much water consumption. Try cutting back on vegetables for a few days, especially any high in water content like cucumber, and encourage him to eat more hay as it should be the vast majority of a guinea pig's diet. You could also administer a probiotic like Probiocin or Bene-Bac. Here's a video on the topic.
Another possible solution is to give a small dose of Activated Charcoal mixed with water. This is most often used for treating diarrhea in guinea pigs but can also be effective for runny poops. Here's another video explaining more.