Constipation can be a considerable cause of abdominal pain. If your grandson is this impacted he likely needs some medicines to help clear up the constipation, including enemas and medication by mouth.
There are other causes of abdominal pain as well, such as celiac disease, ulcers, and several other GI problems. I would recommend your grandson be evaluated by a GI specialist.
Regarding the pain at night there are a few reasons that this may be. First, and probably most likely, kids tend to slow down at night and are less distracted by other things so the pain becomes more obvious and more focused on. Also, there are some hormonal changes that can change the perception of sensations including pain.
Follow up with his doctor is important.
Advice and opinions given are based on the information provided and must not be considered an official medical recommendation. The limitations of the internet prevent an appropriate evaluation. Always consult your doctor if there is concern.