When gastroenteritis is caused by a virus, usually there is no medical treatment needed. It just takes time for the viral infection to run its course. You can treat the symptoms of vomiting and diarrhea at home by staying hydrated. Drink a lot of clear liquids, including sports drinks or oral rehydration solutions such as Pedialyte. If you can keep food down, a diet of bland foods such as saltine crackers or broths may be better tolerated. Foods with a lot of sugar or fat may make your symptoms worse. The BRAT diet is also an easy transitional diet to gradually go back to your regular diet.
If you cannot keep liquids down, have continuous vomiting, or frequent diarrhea, see a doctor. In addition, if you have other symptoms such as fever, blood in your stool or vomit, severe abdominal pain, or think you may be dehydrated, seek medical attention. Your doctor may prescribe antibiotics if a bacterial cause for your gastroenteritis is identified. You may be prescribed anti-nausea or antidiarrheal medications, or over-the-counter (OTC) medications may be recommended.
UpToDate. Management of acute viral gastroenteritis in adults.