Dirt nap is a euphemism for dead and buried. As it is a colloquial phrase, it tends to be used often in genre fiction and in speech and dialogue.

The general idea is that someone is in a permanent sleeping state and is in a dirt grave, most likely without the protection from subterranean hazards like insects and water by being encased in a coffin. In many genres, particulary crime and mystery, a character is killed off and driven to a remote location and buried in the night.

It can also be used as a threat. If a mafia goon gives you a warning that you’re heading for a dirt nap, you can assume they’re telling you that your body will be buried where nobody could find it. Similarly, if they were going to dump your corpse in the water, that would be “sleeping with the fishes” or “wearing cement boots.