It can go off even if you are near it when plugging it in, etc. That is the only real access to the sensor settings. Unless there is an app on it now that is messing with them. That I can't say. You can try restarting the device in "Safe Mode" to see if the issue occurs when in there. Since only limited items can run in that mode, if the problem is other software/apps then it should stop in there. Should none of this resolve it, you may want to have it looked at to check for a hardware issue.