There is some affection in it, kate1811; that was a good instinct on your part. I wouldn't say "nighty-night" to someone I didn't know well. As Pedro y La Torre said, you could say it to friends, children, family, or your special someone. It's not intimate, just affectionate.