Samuel was the prophet who anointed David (1 Samuel 16:13). He was also the one who anointed Saul (1 Samuel 10:1) and he served as a judge in Israel for many years (1 Samuel 7:15–17). He would have been the ideal candidate to intercede between David and Saul and the ideal person to ask for advice.
18 Now David fled and escaped, and he came to Samuel at Ramah and told him all that Saul had done to him. And he and Samuel went and lived at Naioth.