I'll try to play devil's advocate and argue in favor of this, and give some possible ideas for improvement. By extension, lack of these improvements can be interpreted as weaknesses for you to attack.
The hole itself
There's already several posts calculating the weight of dirt pushing on you.
Suffice to say, dirt is heavy. I used to have a cat that weighed not more than 10 lbs. Sometimes, when I'm asleep, he'd come and decide to take a nap on my chest. The weight was enough to make breathing very noticeably difficult - and a column of earth 3 feet high is certainly much heavier than a cat.
So he cannot merely bury himself: He would be unable to breathe, and his body would be crushed. I don't believe calculation is even necessary at this point: A simple experiment of sitting on your arm for several hours nicely demonstrates the point (don't actually do this!).
There are, however, two simple solutions.
As described elsewhere, wear strong, rigid armor. Note, however, that sleeping in armor is supposed to be uncomfortable - for instance 3.5e DnD has specific discomfort rules for it, and there's nothing stopping you from house ruling your own. Besides, the armor has to be very rigid - most armor (and all armor described in the DnD books) has back and front sections connected by flexible straps, and does not have them supporting each other. Moreover, armor is not supposed to be an isolated suit - bits of earth would seep in, transmit pressure, and defeat the protection.
I think the more reasonable idea is to create an actual walled tomb of some sort. A coffin would be a start, but that's a lot to carry around. The sides and bottom are not really doing anything, so you might as well just carry the lid: A big flat board, that can be laid on two banks of dirt on the sides that you left out while digging, then the soil goes on top. This gives you a nice roomy space to sleep in, and has the added benefits of not restricting your movements and letting you twist, turn, and call for help. Here's a side view (section from side):
▓▓░░░░░░▓▓
▓▓░░░░░░▓▓
▓▓______▓▓
▓▓▓░░░░▓▓▓
▓▓▓░░░░▓▓▓
▓▓▓▓▓▓▓▓▓▓
The board is a bit clumsy to carry, so you can just carry the individual planks in a nice portable bundle that isn't all that heavy (more than just a simple sleeping bag, but probably not too bad with high Str). The supports of the roof could also be rocks that you dug out, or found nearby for even more stability.
For extra safety, the boards could be arched upward. A few steel reinforcing beams could add yet more sturdiness. To avoid earth seeping through the cracks, you could throw a thick tarp over the roof before filling in the hole.
While you're at it, get a second, thin but waterproof tarp that you use to line the bottom and walls. If you interlock this correctly with the top (also waterproof) tarp, you will be reasonably safe from water as well: Most of the water will presumably seep downwards and little of it will flood into your little cocoon (to be sure, it could get very humid, but I doubt you would actually drown). Insects and burrowers are also deterred.
This does require you to carry some planks and/or metal beams, a small amount of tarp, and spend some extra time finding the boulders. In all, I think that a player who goes as far as to bury themselves to ensure safety would not mind the extra weight (it can be split between party members) and fetching some boulders would probably not take too long (and it's good exercise!).
You can conceal most aspects of the hole, but the strength of the structure is limited. I imagine the maximum weight it can bear is not much higher than typical weight (to keep portable materials right). What happens if an enemy bear, or cavalryman steps on the hole? Will it collapse, creating a crisis of players needing to quickly rescue their friend?
The digging
It's important to remember that digging takes time. As has been noted above, even with several people, this thing will take time to set up, probably 2+ hours. In reality, depending on physical condition of the diggers, energy (they have just finished traveling all day), skill and many other factors, the process could easily take up to 6 hours, but I think it's fair to call it 2-3 hours in usual conditions (similar to how everything else in the game is slightly unrealistic for dramatic effect).
Let's pretend the party travels for 8 hours and then digs the hole in 2 hours. Presumably, they could travel for 10 hours instead and move 25% faster, reaching the destination in 4 days instead of 5. Committing an imaginary character to dig ditches for hours just to please a whim is easy of course, but will the party feel so cavalier when they are in a hurry to get somewhere? Maybe, "Screw your hole, Feloras, we don't have the time. If we don't reach the Hobbleton before the Orcish army does, our entire quest is a failure!"
The digging itself is also some solid labor, and by the end the diggers will be exhausted. Though to be fair, if they do this regularly their bodies should adapt after a week or two, and I would even consider slightly increasing their relevant attributed given the strenuous exercise. For comparison, a typical weight lifting regimen will last 1.5 hours every other day and involves lifting heavier weights and doing comparable work. You do need to dig every day, but you could have two alternating teams of diggers: On the workout day you dig, on the off-day you forage for firewood and water. Quite healthy lifestyle, actually.
Now again, digging is not as good as say squatting or bench pressing, splitting into teams will make it take even longer, there is constant risk of back injury, and they will likely be overtrained since they are physically active already. But it's a game, and it doesn't seem like more of a stretch than what is already allowed, like getting stabbed in the face and shrugging it off because you still have 2/3ds of your HP left. Might as well allow it.
The bigger issue is the necessity of doing so much work. At slightly higher levels, there are many spells that could alert you when danger is nearby. For example, the Level 1 Alarm spell: In 3.5e, it is enough to cover an elf's rest at Level 2. In 5e it's 8 hours from the get go. At higher levels there are even better spells (there are also insta-dig spells and spells to summon diggers), and spells aside, even climbing up a tree with a hammock seems less work than constant digging.
Note that the above assumes nice soft earth as one might find in a temperate forest. The trick fails completely if:
- Most of the soil is sand.
- There are many large boulders embedded in the soil that are too heavy to lift.
- The area is arid, so the ground is packed, dry and very hard to dig (but perhaps you could create water to help).
- The water level is too close and your tomb ends up being a well.
On the other hand, if you are lucky enough to find pits, dried stream beds (actually very dangerous because it could flood - but why tell the players that?) or overhangs your job for that day could end up being a lot easier.
Air
The various dynamics of air flux have been discussed in detail, so I'll conclude: In reality, I wouldn't do this (too dangerous/uncomfortable) but it is not that much disbelief to suspend. Might as well not split hairs and let him breathe through the straw.
The bigger concern is the straw itself. I imagine a character who does this would have a specially constructed "straw" with several useful features:
- Made of metal or other sturdy, easy to clean (these breathing tube contraptions start stinking something awful very quick) material to minimize risk of being crushed.
- Possibly telescopic or collapsible for portability, although a 3-foot tube is already quite portable.
- Has a little cap on top in case it rains, and a net or grill to deter insects.
- A wire running inside the pipe, attached to a bell on top, and going to the player's hand below, to allow easily alerting the party (they can agree on a code of various signals, perhaps even a morse code).
- Maybe a second tube, one with a funnel at the bottom. Air warmed by the player rises through the pipe, driving ventilation.
- The input tube has an elbow on the bottom, so that even if it rests on the bottom air flow is not blocked. Optionally a flexible hose extends to the player's mouth.
- A small wind, water, heat, spring or magically powered fan on top to further increase ventilation and air quality.
- A hand operated air pump at the bottom, in case the player feels too stuffy.
- A net with fake leaves, moss and grasses to throw around the pipes and camouflage them. For even more stealth, arrange the tube so that it exits inside a bush.
Protection
As mentioned before, I imagine the biggest danger would be cave in. Hopefully the error margin can tolerate party members stumbling above in the morning, but what if a heavy animal happens to walk over? Not so good.
You could create some kind of light obstruction, like a stick tipi. This will make you conspicuous, so you're counting on your friends to defend you.
Burrowing insects and small animals have been brought up, but I don't think these should be a serious issue. For one, as any camper knows, scorpions, spiders, bugs, centipedes, mice, foxes and myriad critters are just as common on the surface, probably more because it is more accessible and the smell of food is stronger. Meanwhile, underground there are not only few animals that can reach you but they might be disturbed by the unfamiliar smell (for even better effect, bring a strong-smelling herb with you as a repellant and air freshener).
Because of the tarps, most insects are already blocked. If you wanted to get really elaborate, you could have a third, circular netting that gets attached from the inside to cover the junction between the two tarps - together with grills on the ventilation system you are now completely isolated. Lucky that you have darkvision so setting up the net from inside won't be too hard.
The larger burrowing animals would probably be frightened by the excessive digging, and keep away out of fear of being hunted. If you happen to stumble on a burrow, the inhabitant shouldn't be hard to dispatch even at Level 1, and you will certainly know it from the very obvious holes in, well, your hole.
For emergencies, it's helpful to have a way of getting out. The simplest would be some kind of teleportation device (spell, scroll or magic item) but if you have access to that you can probably just use the instant shelter spells like Leomund's Tiny Hut.
Alternatively, you can have means of summoning help. Some 3.5e and 5e examples:
- Unseen servants last for an hour, and are capable of lifting 20 lb. It isn't clear if they can do hard labor, but why not? If it takes 10 seconds to shovel 20 lb dirt, that's 7200 lbs dirt in the 1 hour it's around. That oughta be enough to at least uncover your face and arms. You can summon multiple times as well, and have them dig you out. A magic item that can cast Unseen Servant 3 times a day ought to be quite cheap.
- Dire badgers are CR 2 in 3.5e and have 10 ft. burrow speed, leaving behind a 5 ft. tunnel. It can be summoned by a Level 3 Druid for 3 turns. The dire badger could dig a tunnel to you with half of its move action, so it would easily get you out even if you were suffocating. The question is how to cast the spell: What if you can't move, what if DM says you don't have line of sight, etc. Worst case scenario, you just dig the tomb a bit larger and summon the badger inside, then have it dig it out. A one use emergency magic item could easily be made pretty cheap.
Conclusion
In terms of being realistic, it isn't, really. If someone in real life claimed they will do this, I would laugh in their face. I'm sure it is possible for the purposes of a stunt, but as a routine thing, out in the woods away from help? It would be a stupidly risky thing to do no matter what horrors roam at night.
That said, DnD as a whole isn't realistic to begin with. In that sense, I think burying yourself isn't really outside the boundaries of the typical suspension of disbelief. Especially with some flavor explaining why the character acts in such an outlandish manner (maybe they have very low Wis and serious mental disorders) and it seems like as good as any plan your average party of "adventurers" would come up with.
If you are worried that the player has found an overly-clever way to avoid trouble when resting, don't forget that it's only clever until level 5, when Wizards can cast Leomund's Tiny Hut, and all of this is irrelevant.
Up until that point, it is indeed a strangely effective method of protecting yourself, but then so is climbing up a tree with a hammock (and it's a lot less hassle).
In fact, it can possibly be done in a very fool proof way, but I'm willing to bet your player hasn't covered these. A naive version is so ridiculously error prone, even compared to hammock-in-a-tree, that you could easily exploit these weaknesses to teach him a lesson. For example, a light rain fills the hole with water half-way up - doesn't actually harm the player, but it ruins the rest and scares him silly. Or, part of it collapses on his legs halfway through the night - how lucky it didn't collapse on his face! Or many other possibilities that have been proposed: I was particularly amused by someone farting in the straw.
These are inherent flaws in the strategy, and so would work better than telling the player that the earth will be too heavy, or the air circulation won't be enough, which just leads to pointless hairsplitting over exactly how many liters of oxygen per minute elvish physiology can tolerate. If you implemented every suggestion I make above, these difficulties can be solved (emergency digger to fix caveins, hand-pump to get rid of farts, tarp prevents flooding, etc) but if your player went to all that trouble then might as well let him have fun with it. It's only for 4 levels anyway.
Meanwhile, if he left out just one of the numerous safety precautions, you can really frighten him within an inch of his life to the point of abandoning this silliness entirely, and best of all they are abandoning it out of their own volition, not your say so (or they could continue trying to improve it and develop a comprehensive version).