For victims of perennial "upset stomach," a new study concludes that "relief" isn't spelled a-n-t-a-c-i-d-s.

Swedish researchers who studied 159 patients with recurrent stomach distress not caused by ulcers found that two popular treatments -- antacids and the prescription drug cimetidine (Tagamet) -- were no more effective than a placebo in relieving pain, nausea and heartburn. Their findings appear in today's New England Journal of Medicine.

The findings have no bearing on treatment of ulcers or esophageal reflux, two common causes of upper abdominal pain in which antacids or cimetidine are often prescribed. But for those with longstanding stomach pain who do not have one of those conditions -- usually diagnosed by X-ray or examining the stomach through a viewing tube -- the study suggests that neutralizing stomach acid or decreasing its production does not relieve pain.

Dr. Michael Weinstein, a gastroenterologist affiliated with George Washington University Medical School, cautioned that the results do not necessarily apply to people with occasional indigestion or with upper abdominal pain of recent onset, many of whom do seem to get relief from antacids or cimetidine.

He said it is routine practice to try antacids or cimetidine in such patients before doing expensive tests, provided there are no other symptoms. If the pain is relieved, the medications are stopped after a short time. If it does not recur, no tests are needed.

Patients studied had pain over at least two months without evidence of an ulcer, esophageal reflux (a disorder in which acid from the stomach travels up into the esophagus, producing heartburn or a sour taste) or irritable bowel disease (a condition in which pain is usually in the lower abdomen, accompanied by constipation or diarrhea). They were divided into three treatment groups -- one treated with placebos, one with antacids and one with cimetidine. All received identical-looking pills and packets.

Placebo treatment reduced pain by 25 percent. Both antacids and cimetidine caused a 4 percent greater reduction -- not a statistically significant difference.

A spokesman for William H. Rorer Inc., manufacturer of the antacid Maalox, declined comment on the findings.

Dr. Michael Young, vice president for regulatory affairs of Smith, Kline and French, Tagamet's manufacturer, said the researchers may have failed to find a benefit from the drug because the patients studied belonged to a highly select group whose pain was unrelated to stomach acid.

"I think it's clear that Tagamet can, in the right circumstances, bring relief to patients. I think that's true of antacids, too," he said.

Stomach pain" prompted 3.5 million visits to doctors by Americans in 1981, according to the National Center for Health Statistics. In the same year, they spent more than $550 million on antacids.