I faintly recall a video of somebody pouring coffee or tea into a mug while transitioning through upside down in a barrel roll.
For the water to stay in the glass, it doesn't have to always be 1 G through the vertical axis of the glass. Anything positive will do the job.