In mechanical terms, a rest is when a PC is able to take a break and relax for at least 6 consecutive hours within the game (or another amount of time as determined by the DM). Sleep is not required, but the PC should not be particularly active or doing anything especially useful. The DM determines whether any particular form of downtime counts as resting. At the minimum, sleeping should always count, but other options should also be available in case of a PC wishing to rest before sleep is actually needed.
After a rest, PCs regain the use of all Extra Effects, and players may reconfigure the contents of their decks or swap Rituals and Augments. Rests are usually also required as a part of recovery from Disease or Petrification.
The mechanical function of resting has no impact on the narrative need for sleep for any of the characters within the game.