The duration of stomach pain and vomiting varies depending on the underlying cause. Symptoms usually resolve within a few hours to a few days. However, if symptoms persist or worsen, it is essential to seek medical attention.