The relative Langlands program, as developed by Sakellaridis and Venkatesh, conjectures relationships between spherical varieties and automorphic L-functions. In the local setting, this is conjecturally related to the computation of asymptotics, or more precisely nearby cycles, of an IC complex on the formal arc space of a spherical variety. I explain my joint work with Yiannis Sakellaridis where we establish this connection and compute this nearby cycles for a nice class of spherical varieties using perverse sheaves and the geometry of semi-infinite orbits and affine Grassmannians.