HTPC with Melloware Intelliremote software. After pressing a power button on a remote control, computer wakes up and after a few seconds goes back into a sleep mode.
Resolved by using sleep.exe instead of default sleep command. Simply map your remote's power button via Intelliremote to sleep.exe executable.
More info about sleep.exe can be found here.