I know of someone who experienced a psychotic episode after water fasting, but they also deprived themselves of water and sleep and had some drugs in their system. It was apparently quite intense and brought on some hallucinations.
When Jesus went into the desert for 40 days, and experienced "visions.." well, there's the historical evidence that people have always experienced a mental shift through such practices. Except these days we tend to call it "episodes" rather than "visions."