The two main causes of unexpected waking are one of the input devices giving a false signal, or Wake-on-Lan being activated. The symptoms you describe sound more like the CPU is overheating on shutdown, waking to get the fans going to reduce temperature and failing the task. It may be...