In this case, it is. You are right in saying that it is not a word-by-word translation; but a word-by-word translation ("Calm night.") would be wrong here.
In English, you would say "Good night" as a farewell at night or when tucking someone in to sleep, and for that, you would use "Спокойной ночи." in Russian.
online keybord im using.