My IPad Air was purchased 3 weeks ago. Recently I discovered it will go into "locking mode" on its own. It has to be turned back on with the top button and your passcode must be input to get back to your app. A few times it will turn itself back on within a second or two on its own.
This does not have anything to do with the interval of time setting for auto lock, because I have changed the time interval with no change in the problem. It seems to mostly occur when the IPad is being tilted or moved, suggesting the problem is in a motion sensor. I am now trying to troubleshoot a possible reason, and toward that end, turned off the "autolock" in settings. So far, the problem has not reoccurred. This is not satisfactory since I have a cover which activates the locking feature when the cover is shut.