It could be a software problem, a hardware problem, even a virus, malware or a bad app. To many variables to say for certain.
If this happens often, I would try starting up in the device in "Safe Mode" and see if it happens in there. Yes in that mode you can't do a lot of things, but this is a good way to test if the problem is hardware or software. If it is hardware, it will still happen, even in "Safe Mode", but if it isn't, it may well stop doing it when in that mode.
If it stops doing it while in "Safe Mode", then I would check the tablet for viruses, malware, bad apps, etc., which could be interfering with the tablet.
To get into "Safe Mode" please do the following.
1. First turn off the tablet.
2. Next press and hold "Power"...