Stomach pain in the middle of the night is associated with chronic gastritis, duodenal ulcer, pyloric obstruction and other factors. Chronic gastritis is mainly caused by the violation of gastric mucosa by gastric acid due to the damage of the protective barrier of gastric mucosa. Patients are more likely to experience pain in the middle of the night because of the higher concentration of gastric acid. Patients with duodenal ulcer not only have hunger pain, but also have midnight pain, mainly due to excessive secretion of gastric acid in the middle of the night, which enters the duodenum in a high-intensity state. Once the duodenal mucosa is accompanied by ulcers, it will lead to spasmodic contraction of the duodenal smooth muscle thus causing pain. In some people, the scar will be located in the pylorus, which can easily lead to pyloric obstruction. When pyloric obstruction occurs, food does not empty from the stomach in time and accumulates in the stomach. During the night, the food in the stomach ferments badly and causes the stomach wall to dilate excessively, so there is a vague pain in the stomach, and some people may vomit the food they ingested during the day.