i think it is. I've heard stuff like sweet dreams (about me), nighty night, night babe, and little stuff like that. I usually feel like being creative when it is someone I like so yeah I think it is a way to flirt
yes in a way depending on the relationship. I texted my guy "Good night bye sweet dreams" and he texted back "Night night hunny" and that definitely made my day. So I think that it all depends on the type of relationship you have with the person.
It's kinda hard to say. For some people, it's just a normal thing to do if you're texting right before bed. For others, it may mean more. It depends on the person and how close you are. In this case it seems like he was just saying it back because you said it.