There is a possibility that he might be suffering from depression. But without proper history it is very difficult to diagnose. It is not necessary always that stomach upset happen due to physical cause only.
Next Steps
you may either consult a psychologist and can get him evaluated or a homeopathic / allopathic psychiatrist. homeopathic psychiatrist will prescribe homeopathic medications for him which will treat him holistically for his mental and physical complaints both. in case you wanna know more in detail how homeopathy can be of help, you may reach out on my website, or may reach out thru practo also.
Health Tips
plz follow some sleep hygiene routine, like making the sleeping environment, going to bed at same time, reading a book before sleep, avoidg gadgets at that time and some yogasana and meditation music which helps in sleep induction.