Sleeping is an in-game state that most Mobs can enter. Most animals (such as Beefalo) sleep during night, while monsters (such as Spiders) sleep during day. Different Mobs have different sleep routines, and not all Mobs go to sleep by themselves. Mobs with a home (like Spiders or Pigs) will attempt to return home when they need to go to sleep. If left homeless, they will fall asleep on the spot at the time they usually sleep. The player can put Mobs to sleep by using a Pan Flute or Sleep Dart, or by eating a Mandrake. Sleeping Mobs can be pushed around.
Player sleeping is slightly different from the rest of the mobs, as in-game time is simply advanced while the player sleeps unless the player plays on Don't Starve Together. The player can use a Straw Roll, Fur Roll, or Tent to skip the night, or eat raw/cooked Mandrake to get knocked out. The player can also be knocked out until the next day if any Mob nearby eats a Mandrake. In the Reign of Giants DLC, the player can also use a Siesta Lean-to to skip to Dusk.
The following Mobs can be put to sleep: