The #sit extended command makes your character to 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 an altar lowers your luck.
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.
Currently there is a bug associated with this. 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.
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.