Wow - I don't know where you heard this. It is a colloquialism that we use in Northern England - I don't know if it is used elsewhere. It is traditionally said to children and people who are close to you. It is derived from - night night
You are correct - we say this when we are saying good night.
I can't tell you if the spelling is correct as it is not something you ever write - only something you say.
It made me smile and reminded me of home - thank you :)