The newer, glass panels on general aviation aircraft actually check on the pilot periodically when flying above an altitude of 10,000 (something like once every 20 minutes at 10,000 ft and every 3 minutes at 25,000 ft) But they’re checking for hypoxia, not run of the mill falling asleep.
intercst