Tie yourself to the bedposts. Attach a loop of rope to your dominant hand. After securing your feet and other hand, loop the rope around the bedpost and secure it with a combination lock in the dark. You won't get out until sunrise or a light attached a timer goes on.
If you can find an old windup alarm clock, place a styrofoam packing peanut (flatten one side) on the winder after winding it up and setting it. Put it on something high and balance a handcuff or padlock key on it so the key will fall to the floor when the alarm goes off. Another delivery system is to get a small cup like some restaurants use for croutons or salad dressing. Put your key(s) along with some kind of loop into it. Freeze it and let it drip into a plastic bowl while doing your thing.
Sorry I didn't see your post until now.