Depending on other symptoms you feel the diagnose will be .
if you feel the pain or you have diarrhea symptoms more frequently especially in stress you might have IBS
drinking alcohol at night might give stomach pain at morning
steroid medications also might give this pain since it might cause gastritis if used for long period ,this is a long term period .
Other probable cause might be GERD it , can cause you digestive discomfort in the morning because the condition is exacerbated when you lie down. The bile from your stomach backs up into your esophagus and cannot drain sufficiently when you're prone. Heartburn and stomach pain may even awaken you. The burning sensations caused by the acid can lead to more serious problems such as scarring in your esophagus or ulcers. Losing weight can help you wake more refreshed when you have GERD because your stomach won't be under excessive abdominal pressure. Elevate the head of your bed or sleep on an incline to reduce the morning symptoms of heartburn and acid reflux.
So check with the doctor for further investigations and tests to daignose your case and treat it .