Quick answer
Споко́йной но́чи.
spakóynay nóchi — in the genitive, because it is a wish, not a greeting
The options
Why the genitive
Wishes drop the verb жела́ю (“I wish you”) and keep its genitive object: споко́йной но́чи, до́брого пути́, всего́ хоро́шего, уда́чи. The genitive is the fingerprint of a wish in Russian.
Not a greeting
Unlike до́брый ве́чер (good evening, used on arrival), споко́йной но́чи only ever closes an encounter. Saying it when you walk in at eleven at night would be a genuine mistake.
What you hear back
Typical mistakes
Споко́йная ночь!
Споко́йной но́чи!
A wish takes the genitive.
Using it to say hello at night.
До́брый ве́чер.
Good night is only for parting.
Check yourself
Which case is споко́йной но́чи?