There can be multiple reasons for stomach pain during the night, ranging from stress, food sensitivities, late night eating, eating difficult to digest foods etc. Try meditating and/or journaling before bed, even just for 5 minutes to help clear your mind and relieve stress. Also be mindful of how late you are eating and what you are eating throughout the day. Tune in to how your body feels a half hour- 2 hours after you eat to see if something is triggering you. Some difficult to digest foods you can experiment with cutting out to see if it helps are animal products (including dairy) and gluten. I would need a lot more information about you and your lifestyle in order to really pinpoint what's going on but these are just a few general ideas for you to try :)