Apple added a feature called "inactivity reboot" in iOS 18.1. This is implemented in keybagd and the AppleSEPKeyStore kernel extension. It seems to have nothing to do with phone/wireless network state. Keystore is used when unlocking the device. So if you don't unlock your iPhone for a while... it will reboot!

In the news: "Police Freak Out at iPhones Mysteriously Rebooting Themselves, Locking Cops Out"
https://www.404media.co/police-freak-out-at-iphones-mysteriously-rebooting-themselves-locking-cops-out/

iOS version diffs to see yourself:
https://github.com/search?q=repo%3Ablacktop%2Fipsw-diffs%20inactivity_reboot&type=code

Police Freak Out at iPhones Mysteriously Rebooting Themselves, Locking Cops Out

Law enforcement believe the activity, which makes it harder to then unlock the phones, may be due to a potential update in iOS 18 which tells nearby iPhones to reboot if they have not been in contact with a cellular network for some time, according to a document obtained by 404 Media.

404 Media
@jiska @cstross Is this also in iPadOS? I have mine on a stand next to my Mac’s monitor (which it is also connected to via a USB hub), but it is my least-used device, and it mysteriously rebooted itself last night.

@rick_baumhauer for all intensive purposes iPadOS is a different branch of iOS and as this is not a platform-specific feature to my knowledge I very much expect this to exist on iPadOS too

I may check the IPSW diffs of an iPad and reply later if I find the time, but in no way should you consider me an expert on this 

@cyrus Thanks! It’s my assumption that it is part of iPadOS, but since this was the first I’d heard of this “inactivity reboot”, I wanted to get confirmation (within reason - I don’t expect anyone to spend their day digging through this) before I chalked up my mystery reboot last night to it. It does make sense, though - I’m sure I hadn’t done much with my iPad in a few days.
@rick_baumhauer fwiw, this functionality is new, iOS (seemingly?) could force you to put in your PIN before but that is less powerful than never having entered it after a reboot - as at that point the key to data on the device has not yet been entered by the user and as such cannot be extracted from anywhere on the device