The problem you are describing appears very vague and it is difficult to give a very clear opinion on this matter.
Although depending on the description and the gastric problem you are describing, it can be associated with the gastric problem, which may be causing abnormal amount of gas production and gastritis
which may be causing this feeling of something moving into your head and in the back.
Apart from this I would also suggest you to have a proper blood pressure check up to make sure that this is not something because of high BP
and other neurological problem.
In the mean time you can take a proper diet which is easy on your stomach and make sure if this problem is associated with some specific food.
Hope this will help you. Thnaks