  The present paper is devoted to geometric optimization problems related to
the Neumann eigenvalue problem for the Laplace-Beltrami operator on bounded
subdomains $\Omega$ of a Riemannian manifold $(\mathcal{M},g)$. More precisely,
we analyze locally extremal domains for the first nontrivial eigenvalue
$\mu_2(\Omega)$ with respect to volume preserving domain perturbations, and we
show that corresponding notions of criticality arise in the form of
overdetermined boundary problems. Our results rely on an extension of Zanger's
shape derivative formula which covers the case when $\mu_2(\Omega)$ is not a
simple eigenvalue. In the second part of the paper, we focus on product
manifolds of the form $\mathcal{M} = \mathbb{R}^k \times \mathcal{N}$, and we
classify the subdomains where an associated overdetermined boundary value
problem has a solution.
