Maybe the answer to this enigma hinges upon Jesus' statement made to the Sadducees at Luke 20:37-38.
"But that the dead are raised, even Moses showed, in the passage about the burning bush, where he calls the Lord THE GOD OF ABRAHAM, AND THE GOD OF ISAAC, AND THE GOD OF JACOB. "Now He is not the God of the dead but of the living; for all live to Him."
I even think the resurrection of Lazarus gives a clue to this puzzle as well. Lazarus was declared dead for four days. Every part of his body was in the process of decay. Jesus' statement above implies that the dead are alive with God. Jesus tapped into that special place where God keeps the living dead in order to bring Lazarus back.
Back to Saul and the witch of Endor. If it was a demon, the demon would have refused to comply or would have given better news to Saul even if it was false information. Since the message from the woman came true it had to come from God. It would have to be God speaking through the brain pattern of Samuel.