You will need to stop drinking and eating up to eight hours before your endoscopy to ensure your stomach is empty for the procedure. Tell your doctor about all the medications and supplements you're taking before your endoscopy.