A shared expression across three languages
Bosnian, Croatian and Serbian have separate standard language identities, but much everyday vocabulary is shared. The words Laku noć are an excellent example: the same farewell works in all three. This is a practical advantage for visitors, not a reason to assume that a speaker identifies with a particular language. When talking about the language itself, follow the name that your conversation partner uses.
From a social evening to bedtime
If you have spent an evening with acquaintances and are leaving for your accommodation, a simple night-time farewell is enough. An additional wish about sleep sounds warmer and more personal. For example, lijepo spavaj is a familiar form, whereas lijepo spavajte can address several people or someone you address respectfully. This difference is especially helpful if you are staying with hosts rather than simply sending a message to a close friend.
Reading a message in two scripts
A Serbian-speaking contact may write Лаку ноћ rather than the Latin spelling. Recognising both forms helps you understand a bedtime message without relying on a translation app. The final consonant ć in Latin writing corresponds to ћ in Cyrillic. There is no need to change your own script just to return the farewell. In a friendly conversation, a short reply in the script you already know is a reasonable starting point.