It's very frustrating when you want to listen to some music and your
airpods won't connect to your iPhone or MacBook. This is normally a minor pairing issue or firmware bug. I came across a great troubleshooting article at devicefixes.com that goes through the process of resetting and checking the hardware. I recommend it if you don't want to just "switch it off and on again".