I will discuss joint work with Akshay Venkatesh in which we use microlocalized test vectors (inspired by the orbit method) and Ratner theory to study mean values of L-functions on Gross--Prasad pairs. I will also indicate some further applications of these methods, such as to the quantum variance problem for Hecke--Maass eigenforms.