Why does water stress lead to alkalinity of xylem sap in plants?
According to recent studies, drought stress does not consistently lead
to increases in the pH of xylem sap. One article which discusses
interspecies differences is Vit Gloser, et al., "The dynamics of
xylem sap pH under drought: a universal response in herbs?," Plant and
Soil 409, nos. 1-2 (2016): 259-272.

As to what may have prompted the textbook authors to assert this, see an
earlier article by two of the coauthors of the Gloser essay: Sally
Wilkinson and William J. Davies, "Xylem sap pH increase: a drought
signal received at the apoplastic face of the guard cell that involves
the suppression of saturable abscisic acid uptake by the epidermal
symplast," Plant Physiology 113 (1997): 559-573. Wilkinson and Davies
summarize an earlier study: "Hartung and Radin (1989) found that the pH
of xylem sap from water-stressed Phaseolus vulgaris roots increased
from control levels of 6.3 to 7.2." (560)