The gastric balloon generally remains in the stomach for a period ranging from 6 to 8 months.