Spanish across different settings
A visitor can use Buenas noches to open an exchange when arriving at accommodation, then repeat it when departing or heading to a room. In contrast, Que duerma bien is appropriate when you are wishing sleep to someone you address as usted. The distinction is especially handy when speaking to a host who has already said they are retiring for the night, rather than a receptionist who is still working.
The familiar forms vary by region
Both tú and vos occur in Bolivian Spanish, and the balance between them depends on location and social circumstances. Dormí bien is the affirmative imperative used with vos, while que duermas bien is a familiar wish. There is no need to force a particular local form if you are unsure which one a person uses. Listen for their habitual forms of address, particularly when staying with a family or spending time with local friends.
More than one language for the night
Aymara and Quechua are among Bolivia’s official languages, and their greetings deserve attention in their own right. An expression translated as good night in a vocabulary list may be intended for meeting someone rather than wishing them sleep. It is worth learning the distinction from a speaker of the relevant variety, since a translation alone may not describe the situation accurately. If a conversation is already taking place in Spanish, a simple good-night wish is the most practical option until you have learnt the appropriate local wording.