The pain is real, not invented. The question is what sets it off. When it comes only on school mornings, disappears at weekends and in the holidays, and eases during the morning, the body is reporting strain — and what needs finding is what at school creates it. When it also hurts in the evening and during holidays and wakes the child at night, the cause is elsewhere and belongs with a doctor.
The body remembers what is coming and prepares for it before the child even gets up. This is not acting or making excuses — the alarm system fires the same way it would in real danger, except that instead of running there is a cramp in the belly. That is why reassurance that nothing is happening does not help; what helps is finding out what exactly at school the child cannot manage.
The questionnaire about the child's behaviour at home covers motor skills, emotions, speech and attention in a school-age child. Stomach ache tends to be only the visible end of one of those, and the questionnaire shows which: whether the child cannot keep up, cannot cope with noise and overload, or fears failing.