Maybe "night terrors"? My son use to get like that until he was about 4yo. We asked the pediatrician, what was wrong, and explained how we thought he was having gas pains, he'd awaken, crying, and then wouldn't let us hold him, thinking a good hug and assuring him everything was okay, we'd ask him if he wanted something to drink or even a little snack, for he wouldn't say what was wrong, just cry and then scream at us with the answer, "no", this could last up to an hour, and of course it would happen around the time we all wanted to be asleep.
Night terrors can be frightening to the whole family, the child is awake but seems oblivious to us and his surroundings, if one didn't know better they'd think he was having some sort of temper tantrum, though his eyes were open, I think he was really not awake.
The pediatrician, explained this is mostly caused as the child is growing and the brain's functionings too, she assured us they grow out of this. He did, and we went through this, I am happy it was occasional and not a nightly thing. As an infant he had bouts of collic till we changed his formula, the night terrors reminded us of the way he would be at that time, making me think it was gas waking him up when he was a toddler and the "night terrors" began. Night terrors are not the same as nightmares but can have the same appearance.
There are books about this, and I'm sure now with the internet, you'd find info or even websites about this.
It's so hard going through this cause as a parent or anyone experiencing a child's night terrors makes one feel helpless, cause at the heigth of the terror, nothing seems to sooth them, it just is a matter of it wearing off, and our son then would fall asleep in the family room with us and then we'd carry him up to his bed. Whew!! we'd finally get sleep.
It may be a good idea to see what the pediatrician feels about what could be the problem.
I wish you and your family the best.

Take care now,
DE