Read the word in the Greek alphabet
Καληνύχτα is a single word, although it is built from elements meaning good and night. In ordinary writing the accent shows that the main stress falls on νύ. The letter χ before τ represents a rough sound similar to the ch in Scottish loch. It is not the English sound at the beginning of church. Latin spellings such as kalinichta and kalinikhta offer different approximations of the same Greek word, not different farewells.
A late meal does not always mean bedtime
Imagine leaving a taverna after dinner while your companions intend to continue the evening elsewhere. A good-night farewell is possible when parting at night, even if nobody is immediately heading to bed. A wish for a pleasant evening may also fit when there are more plans ahead. This differs from telling someone to sleep well, which is more specific. The context gives a short Greek expression its force, rather than a universal rule tied to a particular hour.
Match a sleep wish to the listener
Modern Greek distinguishes familiar singular address from plural or polite address. A friend receiving a private message may hear the familiar imperative, while several guests can be addressed with the plural form. You can also personalise a night-time wish by using σου for someone familiar or σας in polite and plural contexts. The standard one-word farewell is a useful alternative whenever you are unsure how to address the person. Save more affectionate dream wishes for relationships where they feel natural.