The bedtime grammar of vos
In Uruguay, vos is an established familiar form of address, although patterns involving tú also occur. The imperative Dormí bien has the stress on the final syllable of dormí, unlike the tú form duerme. This is a useful distinction to recognise if you have learnt Spanish elsewhere. You can also hear descansá when someone is being encouraged to get some rest after a busy day.
Ending an evening without announcing bedtime
Buenas noches is appropriate at the end of an evening even if your next stop is another café or a friend’s home. It does not carry the same implication of sleep as good night sometimes does in English. In an ordinary exchange at a restaurant, the phrase is sufficient without further explanation. If you want to make the separation until tomorrow explicit, add hasta mañana to your farewell.
A little warmth without overdoing it
Dulces sueños is best saved for a situation where the other person really is going to sleep and you share a friendly or affectionate relationship. A short dormí bien can sound caring without making the message elaborate. When talking to someone who expects usted, que duerma bien provides a more suitable form of the same wish. In either case, you can learn the other person’s preferred register by listening to the way they speak to you during the conversation rather than relying on a rule about age alone.