Isomonodromy for the fifth Painlev\'e equation P_5 is studied in detail in the context of certain moduli spaces for connections, monodromy, the Riemann--Hilbert morphism, and Okamoto-Painlev\'e spaces. This involves explicit formulas for Stokes matrices and parabolic structures. The rank 4 Lax pair for P_5, introduced by Noumi--Yamada et al., is shown to be induced by a natural fine moduli space of connections of rank 4. As a by-product one obtains a polynomial Hamiltonian for P_5, equivalent to the one of Okamoto.