Warning: Your iPad may put your MacBook to sleep
If you use your iPad in close proximity to your MacBook, there's a chance that the MacBook might fall asleep. Don't worry; it's not permanent.
If you have an iPad and one of Apple's laptops (a not too uncommon pairing), then be aware that, depending on how you arrange them, your iPad may put your Mac to sleep.
Apple has made some creative use of magnets in its systems over the years, with lid latches, MagSafe power connections, and other accessory attachments for its systems.
One notable area where Apple has made use of this technology is in its MacBook laptops, where magnets and magnetic sensors in the chassis and lid bezel activate when in close contact, so the system will automatically go to sleep when the display is in a closed position.
This feature is a convenient option to have; however, unlike mechanical latches, magnetic fields are not specific to the desired device and will attract or repel items whether you want them to or not, so they may trigger or be triggered unintentionally.
The magnets in the MacBook are in the bezel, and the sensors for them are in the periphery of the chassis around the keyboard and speakers, which positions them so they can easily be influenced by other magnets in the laptop's environment. As such, Apple recommends avoiding running a laptop when stacked on top of another, as the alignment of one laptop's lid magnets with the chassis sensors of another can trigger the switch and cause one to go to sleep.
This is also true for other devices that contain magnets, with one of them being Apple's iPad. The magnets in the iPad, located along the left side of the unit, are relatively strong for holding Apple's iPad cover. Unfortunately, this means that if you place the iPad on the table to the right of your laptop and snuggle them up together, the magnets on the iPad body may align with the sensors on the MacBook, and could potentially cause the MacBook to go to sleep.
Since the MacBook will not wake while these magnetic sensors are triggered, it may seem as if it has suddenly crashed and died on you, but the quick remedy is to simply slide your iPad a few inches away and then tap a key on your MacBook to continue working.
This issue may happen not only with the iPad, but with any other magnet that is strong enough or close enough to trigger the sensor. So, if your MacBook suddenly goes to sleep one day, look around for items like watches, or even devices in pants pockets or on your table to see if they could be the cause.