Representability of Hom-sheaves of various moduli spaces (May be a poor title, happy to update)
Recall that for a stack $\mathcal{X} \to Sch$ on schemes (e.g. fppf site) and a pair of morphisms $x,y\colon U\to \mathcal{X}$ ($U$ a representable stack) there is a sheaf $Hom_{\mathcal{X}_U}(x,y)$ on $Sch/U$. Call this a 'local hom-sheaf'.
Reading through Laumon & Moret-Bailly I see that the local hom-sheaf of a pair of coherent sheaves on a projective scheme $X$ is an algebraic space (and is in addition 'sort of affine', namely it arises from a coherent sheaf). The stack (in categories) $Coh_X$ is clearly not algebraic. My question is whether this sort of behaviour (representability of local hom-sheaves by algebraic spaces) happens for other stacks of categories, in particular for stacks whose underlying stacks of groupoids are moduli stacks like $\mathcal{M}_g,\mathcal{M}_{g,n}, \mathcal{A}_g, \mathcal{A}_{g,d}$ and so on, where we take not just isomorphisms between curves, abelian varieties etc in the same fibre, but more general morphisms as well.
 A: For the examples you mention, this boils down to representability of Hom sheaves of flat finitely presented proper schemes, which is due to Grothendieck. These Hom sheaves are not of finite type, though, except for $\mathcal M_g$ with $g ≥ 2$, in characteristic 0, in which all arrows are cartesian. And, of course, if in the case of abelian varieties you require the arrows to preserve the polarization, they are also cartesian.
[Edit]: representability of of Hom sheaves for flat finitely presented proper schemes follows easily from the representability of Hilbert functors. This holds in the category of schemes in the projective case (this is in FGA); for the general case Hom sheaves are only represented by algebraic spaces (this is due to Artin).
[Edit2]: let us take $\mathcal M_g$ as an example. Morphisms $S \to \mathcal M_g$ correspond to objects $X \to S$ of $\mathcal M_g(S)$ (more precisely, there is an equivalence of categories between morphisms and objects). Let $X \to S$ and $Y \to S$ object of $\mathcal M_g$, corresponding to two morphisms $S \to \mathcal M_g$; define a functor $\underline{Hom}_S(X, Y)\colon (\mathrm{Sch}/S)^{\rm op} \to (\mathrm{Set})$, sending each $T \to S$ to the set of arrows $T \times_S X \to T \times_S Y$ in $\mathcal M_g(T)$. This is your local Hom sheaf.
Grothendieck's theorem asserts that this functor is representable by a scheme when $X$ and $Y$ are finitely presented over $S$, and $X$ is projective and flat. Artin's theorem asserts representability by an algebraic space, only assuming that $X$ is proper.
