The #sit extended command makes your character sit down; this can have different effects (and messages) depending on what you're sitting on.
Sitting on a trap while you're trapped in it abuses wisdom, and for some traps, makes you stuck in it longer. Sitting in a pool will rust your armor. Probably the most used feature is sitting on a throne. Sitting on a cross-aligned altar lowers your luck, and on a co-aligned one lowers your wisdom.
You can also lay eggs that are guaranteed to hatch into baby versions of your polymorphed self by sitting, if you are a female oviparous monster and there are no other objects on the square you are on. This will consume as much nutrition as eating an egg gives in NetHack. An exception are winged gargoyles - most eggs will hatch plain gargoyles.
NetHack has a bug that lets you #sit in places you cannot reach. For example, a gnome dies in a pit and you want to loot the gnome, but you escape when you try to enter the pit. Trying to #sit gives you a message about the gnome corpse being uncomfortable to sit on and you won't fall in the pit.
You can repeatedly #sit on a magic trap to boost your charisma. Beware of other possible magic trap effects.
If you have just passed through a two-way magic portal, so that you are on a portal square when you arrive, you can #sit to activate the portal and return immediately. This can be useful if some particularly nasty monsters are around and you do not want to spend even two turns near them (as will often happen in SLASH'EM's Chaotic Quest). Be sure to engrave Elbereth on the portal (preferably permanently) to prevent monsters from following, unless you intend for things to follow you.