You can also say:
* "Sov godt" (pronounced "sohv goht") - This literally means "sleep well".
* "Natskyld" (pronounced "nat-skøld") - This is a more formal way to say goodnight.
The best choice will depend on the context and your relationship with the person you're talking to.