I got an iPad Pro 10.5, 256Gb, Space Gray a couple of weeks back and it too had an issue with restarting..
It had I0S 11.2.5 OOB and had not even had 3rd party apps installed. I did a DFU re-install to 11.3.1 and it started the restarting glitch again later in the day. Apple did a remote diagnostic test whilst it was still alive and stated that the blue tooth module was broken and that's what could be prompting restarts... back to the store I went.
Bizarrely I then got a curved iPad - straight out of the box. On the advice of Apple I swapped it and I now have a flat, fully functioning iPad with amazing battery life🙂
Good luck