Mechanisms of adaptation to environmental changes in osmolarity are fundamental for cellular and organismal survival. Here we identify a novel osmotic stress resistance pathway in Caenorhabditis elegans (C. elegans), which is dependent on the metabolic master regulator 5'-AMP-activated protein kinase (AMPK) and its negative regulator Folliculin (FLCN). FLCN-1 is the nematode ortholog of the tumor suppressor FLCN, responsible for the Birt-Hogg-Dubé (BHD) tumor syndrome. We show that flcn-1 mutants exhibit increased resistance to hyperosmotic stress via constitutive AMPK-dependent accumulation of glycogen reserves. Upon hyperosmotic stress exposure, glycogen stores are rapidly degraded, leading to a significant accumulation of the organic osmolyte glycerol through transcriptional upregulation of glycerol-3-phosphate dehydrogenase enzymes (gpdh-1 and gpdh-2). Importantly, the hyperosmotic stress resistance in flcn-1 mutant and wild-type animals is strongly suppressed by loss of AMPK, glycogen synthase, glycogen phosphorylase, or simultaneous loss of gpdh-1 and gpdh-2 enzymes. Our studies show for the first time that animals normally exhibit AMPK-dependent glycogen stores, which can be utilized for rapid adaptation to either energy stress or hyperosmotic stress. Importantly, we show that glycogen accumulates in kidneys from mice lacking FLCN and in renal tumors from a BHD patient. Our findings suggest a dual role for glycogen, acting as a reservoir for energy supply and osmolyte production, and both processes might be supporting tumorigenesis.