One of the most important factors to focus on when having a stomach virus while pregnant is staying hydrated, according to What to Expect. The need for hydration can be further increased when vomiting and diarrhea are present. If urination is not frequent, or if the urine become a darker color than usual, forcing fluids such as water, fruit juice, warm broth or hot water with lemon is important.
If sipping on liquids is not possible, ice chips or ice pops work in the same way to keep the body hydrated, according to What to Expect. Ease the stomach by consuming fresh ginger in hot water, candied ginger or ginger ale if possible. When fluids cannot be kept down, contacting a doctor is important. In some cases, a rehydration drink is necessary to restore fluids.
According to What to Expect, some over-the-counter medications to help with diarrhea and stomach upset are safe to take during pregnancy, especially after the first trimester. However, it is important to always check with a doctor before taking any medications. With any stomach virus, the best solution is to get plenty of rest. Most stomach viruses pass on their own with little intervention in one to two days.