Set an Alarm clock. Go to bed at least 8 hours before the time you planning on waking up. MAKE SURE YOU ACTUALLY SLEEP! It's all in will. if you know you have to wake up then you should have the will to wake up.
You shouldn't wake up your Tamagotchi. They get angry and won't do anything, but if you set the time for earlier in the day or later (depending on what time it is), the Tamagotchi will be awake again. :)
There's no single factor to wake us up, but a burst of cortisol (a hormone seen in stressful situations) rises around the time we wake up. Other factors may be released in the mid-brain that trigger neurological processes to wake us up.