I shall be happy if you can post me few more details to help me in making comments on your problem of getting pain in stomach at night with increased nocturnal frequency of urination.
You have not mentioned your age in your query which could have lelped me to make comments .
The pain in stomach is likely to be due to hyperacidity
and can be tackled with taking H2 receptor antagonist like Pantaprozol before going to bed.
As regards increased frequency it could be due to bladder outlet obstruction
and needs to be evaluated.
Please consult qualified Urologist
for clinical and digital rectal examination
and get following investigations under his guidance,
1) Routine urine test and Urine culture.
scanning of the abdomen to rule out any prostate problem
Further treatment for urinary problem will be decided by him depending upon final diagnosis.