There's a wealth of info in MSDN about Power management.
List of power management functions with descriptions:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa373163(v=vs.85).aspx
And the usage samples:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa373243(v=vs.85).aspx
However, your question is a little strange: while you're sleeping you're... sleeping ! You can switch the system to Suspend mode, but your software is not running while the system sleeps. So please clarify your question if you want some more specific info. If you're writing a system service or a driver, this makes more sense, but still it is not clear from the question.
To get the power status (battery load, power source) use the GetSystemPowerStatus.
And one more thing. If you're talking about the Windows CE, then here you go: GetSystemPowerState. You didn't tell about WinCE either :)