When putting the computer to sleep, I was experiencing the kernel panic as many others here.
As other people have already suggested, I disabled powernap, followed the procedure to reset the SMC (https://support.apple.com/en-us/HT201295), rebooted, and then activated powernap again. I don't know whether disabling powernap was necessary at all, but it took about 10 extra seconds to do so. Since a couple of days, the problem has gone.
panic(cpu 0 caller 0xffffff8013c16487): "IOSCSIPeripheralDeviceType00::setPowerState(0xffffff80757007e0 : 0xffffff7f944c1236, 4 -> 0) timed out after 101954 ms"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-6153.101.6/iokit/Kernel/IOServicePM.cpp:5296
Backtrace (CPU 0), Frame : Return Address
As other people have already suggested, I disabled powernap, followed the procedure to reset the SMC (https://support.apple.com/en-us/HT201295), rebooted, and then activated powernap again. I don't know whether disabling powernap was necessary at all, but it took about 10 extra seconds to do so. Since a couple of days, the problem has gone.