Note that in the case $g=1$ you don't always get $S^1 \times S^2$, but you may obtain also $S^3$ or the lens spaces, depending on the homeomorphism you choose for the gluing. The point is that the torus has a lot of non isotopic homeomorphism. The same is true for higher $g$ as well.
What I'm suggesting is that a priori the decomposition will depend on the chosen gluing...I'm not aware of any kind of independence result. As you can see in the $g=1$ case, if your gluing fixes the two generators of $\pi_1 (M)$ then you get $S^1 \times S^2$ which is the prime decomposition of itself (being prime); if your gluing swaps them, then you get $S^3$ which is the prime decomposition of itself (being prime). So you get two different decompositions of two different manifolds. "The manifold obtained gluing two copies of $H_1$" is an ill-posed term, and so is "the decomposition of the manifold obtained gluing two copies of $H_1$".
In general, you have to specify which is the gluing $\varphi \in Homeo (\partial H_g)$ you are performing, at least modulo isotopy of $\partial H_g$ (since isotopic homeomorphisms give homeomorphic manifolds $M_g$).