Probably the operating system (ios)? I got this exact problem with my windows in the past. Randomly rebooting, and the wifi and bluetooth also suddenly not working once in a while. Sometimes, when i was unlucky, restarting the pc couldn't fix the problem, so i could only accept my fate.