There is no need to restrict food or drink before having an ECG test. Always let your doctor know what medications you are taking before you have an ECG, and if you have any allergies to adhesive tapes that may be used to attach electrodes.