Hello from JustAnswer.
There are several possibilities to consider. It could be related to an infection of the gut, and the most common would be a viral infection. Usually, there would be some symptoms each day, but it is possible that there could be a couple f days without symptoms between days of nausea, vomiting, and diarrhea.
It could be related to a food sensitivity. If there is any similar food intake on each of the days on which he had symptoms, that would make it more likely that he had food sensitivity.
It also could be related to liver, gallbladder or pancreatic disease, such as chronic cholecystitis or pancreatitis. These conditions can cause episodic symptoms, but are usually more of a concern with more severe acute symptoms or persistent chronic symptoms.
Statistically, it is most likely a viral infection, and the interventions that you have done are appropriate for a viral infection, including rest and clear liquids. A viral infection of the gut can last anywhere from a day to a week or so, and if the symptoms resolve and do not return, then that would support that it was due to a virus. It also would be OK to use a medicine to help ease nausea and vomiting. While the better medicines are only available by prescription, medicines for motion sickness, such as meclizine or dimenhydrinate, are the best that is available over the counter. If the symptoms continue to recur, then it would be appropriate to pursue a proper evaluation.
If I can provide any additional information, please let me know.