Rest is vital in *Kingdom Come: Deliverance 2*. Sleeping fully restores your health, eliminating the need for excessive food and potions. Here's how to catch some Z's.
Early in the game, securing a bed is paramount. During the "Wedding Crashers" quest, choose either the blacksmith (Radovan) or miller (Kreyzl) questline. Completing their initial tasks grants you access to a bed. Radovan, located in the closer town of Tachov, is a convenient option. Finish his smithing tutorial, and you'll gain access to a bed in the room adjacent to the forge.

This bed will appear on your world map as your designated sleeping spot. A nearby chest provides convenient storage. Return here whenever you need to rest and heal.
If a timely return to your bed isn't possible, numerous campsites are scattered throughout Kingdom Come: Deliverance 2's world. These are often found along roads and in forests. Some may be occupied by bandits; you'll need to handle them before resting. Others are empty and ready for use.
Campsites are marked on your map. Interact with the bedrolls to sleep. While the comfort level is lower than a proper bed, it effectively restores health.
Sleeping in NPCs' beds is a last resort. Getting caught will likely lead to a confrontation with guards unless you can successfully talk your way out of trouble.
That's how to sleep in Kingdom Come: Deliverance 2. For more helpful tips and guides, including torch usage and optimal perk choices, check out The Escapist.