Hello
As you mentioned that there is a pain in the stomach , once or twice in a month .
It aggravate , particularly when you eat ice cream .
This type of pain may be due to hyper acidity or
gastritis .
The main causes of gastritis are ice cream , pizza, burger , fried fatty foods.
To help control stomach acid one should not drink alcohol , coke , drinks with caffeine in them or eat chocolates or spicy foods.It also might help to avoid drinking or eating for 2-3 hours before you lie down( this may be the main reason in your case i.e take proper rest after principal meal).
Try raising the head of your bed about 4 inches with blocks.
Over eating the main cause of such type of pain .
Take pantaprazole - d once or twice in day .
Pantaprazole help hyper acidity so it should be taken on empty stomach .
Still no relief after 10 15 days of regular treatment with above medicine , consult a physician and get his opinion.