Build a tall 1x1 column under you, by pillar jumping: look straight down, jump up, and place one of your soil blocks in the space you've jumped up from. By doing this repeatedly, you can get high enough above the ground that the mobs will be unable to detect you. (10 or 12 blocks should do it, but you can go higher.) You will then need to wait until morning. The only drawback for this method is that you might get shot down by Skeletons.
Once it is light enough, and the undead have burned, simply dig out the blocks you're perched upon, until you're back on the ground. (Check for nearby creepers first!) Don'tjust jump off your tower - if you're high enough to avoid mob detection then you're high enough to take damage if you jump, or even die.
Avoid using sand or gravel to make your tower because if a creeper does happen to notice you and blows up at the base of your pillar, the sand/gravel of your pillar will get blasted and all blocks above it will come down with you on top: and the next monster will find you - provided you aren't already dead - and it might be another creeper.
This usually happens when you build a tower of sand/gravel that's too low, a creeper comes and you start to pile your tower up but the creeper explodes, blasting your tower and bringing you down to earth to be meat for his buddies. Dirt and other blocks will not collapse like sand or gravel; your blocks will remain suspended if the lower ones get blasted, leaving you on a floating island, provided your topmost block is above the blast radius. (You might take some damage from the fall, but not much.)
If you are in a desert with only sand and cacti all around, don't try to use cacti (they'll kill you). Instead, gather some sand, press E, and place sand in all four boxes of your crafting grid. This will yield sandstone, which isn't very strong, but isn't affected by gravity either. (4 sand = 1 sandstone, so be sure to gather enough.) (There will also be natural sandstone and stone under the sand, but you presumably haven't had time to dig for it.)
A creeper blast will also alert skeletons of your position, who will then come close and shoot you with arrows and kill you. To prevent repeated creeper blasts beneath you add more blocks to your tower to get yourself higher than you were before. Watch out for climbing spiders or even (unlikely) a spider jockey.
To fend off spiders, break one of the blocks below your top block, or build a lip around the block you're standing on by walking to the edge, holding shift, far enough to see the sides of the blocks and place blocks on those edges, but be careful not to fall off (you will not fall if you are holding shift, unless attacked).
If there are mobs nearby, then it's not worth the risk to do this, just be prepared for the spiders. (Attacking them will knock them down, and they will take damage from the fall.)