Usually, it is sufficient to take a laxative such as magnesium sulfate 3 hours before doing a colonoscopy. Therefore, if you do colonoscopy at 8 am, you can take magnesium sulfate solution at 4-5 am. But at 4-5 am, most people should be in sleep state, not suitable for drinking laxatives, so you can also take it the night before, fasting after taking it. Magnesium sulfate is a salt laxative, a large number of oral magnesium sulfate, its sulfate and magnesium ions in the intestine is difficult to be absorbed, so that the intestinal contents of the osmotic pressure increased, further inhibit the absorption of water in the intestine, increase the volume of the intestinal cavity, expand the intestine, stimulate intestinal peristalsis. In addition, magnesium sulfate has a biliary effect. It is mainly used for emptying intestinal contents before surgery or colonoscopy, assisting in expelling some intestinal parasites or intestinal toxins, etc. Usually after 1-4 hours after the drug can occur violent diarrhea. About 20% of magnesium ions in magnesium sulfate may be absorbed by the intestine, so toxic reactions may occur in patients with renal dysfunction or patients with central suppression, so it should be decided according to the condition, whether you can drink magnesium sulfate for intestinal preparation. Also, pregnant women, menstruating women, frail and elderly should be used with caution.