Question: I've wandered into some dungeon and encountered some necromancers or bandits. I killed some with sneak attack by bow and some turned hostile and they rush to me and I killed them directly. When I sleep, there are no Dark Brotherhood members approaching me. Why?

Answer: 
You have to murder someone who is not by default hostile to you, for example a random townsperson. You will get a message on your screen that you've been "witnessed by unseen forces" and after you go to sleep you will be contacted.
The one you kill must be an innocent.
I wanted to do the Brotherhood quest early in the game because it bugs me to be a murderer. So, I killed that drug dealer (sells skooma and poisons at night) who stands outside the north wall of the Imperial City, but even though he had not gone aggro on me, his death did not count.
Just thought you might like to know how some characters don't qualify at all.