If you're not physically exhausted then yeah. If you tell yourself you will wake up after a few hours, you will probably wake up after a REM and remember to wake up "for real" (as we all wake up after each REM, only we don't remember most of them). Or do it like Zebrah says, drink water. Or an alarm with vibration on instead of sound inside your pillow?