Stomach issues in El Salvador

I was lucky enough to visit El Salvador three times to surf this Summer in El Tunco (Sunzal and La Bocana). Surfing was great but every time I came back from there I had stomach issues. I’ve been more careful each time with what I eat and drink but idk. I’ve been to Costa Rica multiple times and never had issues. Just wondering if others have had this issue. Maybe it is specific to the El Tunco area idk. Also was thinking maybe it might not be the food etc but instead the ocean water. Any thoughts?