I've had plenty of sleep problems with my Macs and there is a similar commandline tool to the Windows one for investigating/logging which processes/devices are preventing sleep.

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/pmset.1.html
_________________________
Remind me to change my signature to something more interesting someday