I have never seen such issue before and after backing it up, I would try resetting the iPad to factory settings, if the problem persists, then this could be an hardware issue and I would bring it to Apple.
I would try a hard reset and see if it's a software problem.
Otherwise, it can be overheating (although I can't see why) but overheating does cause the screen to go black in order to cool the machine down. Odd way to do it though.
Try the reset and if that doesn't work I suggest you take it to Apple I'm afraid.
i turned it off like 5 times and then it went back to normal. Super weird! Wonder what that was. I wasn’t even using it beforehand so it couldn’t have been from overheating