In the beginning of the tenth chapter of Masechet Pesachim, the Gemara records a discussion concerning the issue of "Shinuy Makom," whether one must recite a new Beracha over food if he changes places in the middle of eating. The Gemara presents various different views on the issue, and the final Halacha is likewise subject to some debate.
Here we will address the specific case of somebody who stops drinking to use the restroom and then wishes to resume drinking. Must he repeat the Beracha of She'hakol before he resumes drinking? Since in the restroom one may not drink or recite a Beracha, the individual's using the restroom perhaps constitutes a formal interruption in his drinking, thus necessitating a new Beracha when he wishes to resume drinking.
Indeed, Chacham Ovadia Yosef writes in "Halichot Olam" that a person in this situation must repeat the Beracha of She'hakol before he resumes drinking. This applies to all foods and beverages upon which one recites the Beracha of Borei Nefashot after eating or drinking: if one must interrupt his eating or drinking to use the restroom, he recites a new Beracha when he resumes. In these cases, even if the individual returns to his original location where he had been eating before leaving to the restroom, he must recite a new Beracha.
If, however, one leaves to use the restroom while eating a meal with bread or while eating food requiring Me'ein Shalosh – namely, grain products, a fruit from the seven special species, or wine - he does not repeat a new Beracha upon returning. One who partakes of a food requiring Birkat Ha'mazon or Me'ein Shalosh is obligated to return to his original location for the required recitation. Therefore, even if he leaves to use the restroom, he is still considered bound to his original location, and he thus does not recite a new Beracha upon returning.
Summary: If one eats or drinks a food or beverage requiring the recitation of Borei Nefashot after eating or drinking, and he must use the restroom in the middle of his eating or drinking, he recites a new Beracha when he resumes eating. If, however, this occurs while one partakes of food requiring Birkat Ha'mazon or Me'ein Shalosh, he does not recite a new Beracha when he returns to his place after using the restroom.