It is indeed true that the sequence
$$1 \to \mathscr F_H \to \mathscr F_G \to \mathscr F_M \to 1\tag{1}\label{1}$$
of sheaves of pointed sets is exact. The only nontrivial thing to check is surjectivity on the right, which follows since $\pi \colon G \to M$ locally has a section (around each $m \in M$) since it is a submersion (see for instance this question and its answers).
What follows only uses that \eqref{1} is an exact sequence of sheaves of pointed sets where the first two are sheaves of (not necessarily abelian) groups. There is a Čech type definition of $H^1(X,\mathscr G)$ for a sheaf of groups $\mathscr G$, which we will use to produce an exact sequence
$$1 \to H^0(X,\mathscr F_H) \to H^0(X,\mathscr F_G) \to H^0(X,\mathscr F_M) \to H^1(X,\mathscr F_H) \to H^1(X,\mathscr F_G)$$
of pointed sets. The definition of $H^1(X,\mathscr G)$ is the colimit of $\check H{^1}(\mathscr U,\mathscr G)$ over all coverings $\mathscr U = \{U_i \subseteq X\}_{i\in I}$, where $\check H{^1}(\mathscr U,\mathscr G)$ is a variant of the usual first Čech cohomology. An element can be represented by a $1$-cocycle in $\mathscr G$ with respect to $\mathscr U$, meaning for each pair $i,j \in I$ an element $\alpha_{ij} \in \mathscr G(U_{ij})$ such that for all $i, j, k \in I$ the relation
$$\alpha_{ij}\big|_{U_{ijk}} \cdot \alpha_{jk}\big|_{U_{ijk}} = \alpha_{ik}\big|_{U_{ijk}}\label{2}\tag{2}$$
holds (where as usual $U_{ij} = U_i \cap U_j$, etcetera). Two such cocycles $\{\alpha_{ij}\}_{i,j}, \{\beta_{ij}\}_{i,j}$ are identified in $\check H{^1}(\mathscr U,\mathscr G)$ if there exist $g_i \in \mathscr G(U_i)$ for all $i \in I$ such that
$$g_i\big|_{U_{ij}} \cdot \alpha_{ij} \cdot g_j^{-1}\big|_{U_{ij}} = \beta_{ij}$$
for all $i, j \in I$. This construction is classical, and $H^1(X,\mathscr G)$ classifies (sheaf) $\mathscr G$-torsors on $X$. Although when $\mathscr G$ is representable, you sometimes hope that any $\mathscr G$-torsor is representable too; for instance in algebraic geometry this holds for affine algebraic groups.
The construction above is clearly functorial in the sheaf of groups $\mathscr G$, giving the final map of the exact sequence. Exactness at the first two nontrivial terms is clear, so we only need to construct the connecting map and check exactness at $H^0(X,\mathscr F_M)$ and $H^1(X,\mathscr F_H)$.
The connecting map $d \colon H^0(X,\mathscr F_M) \to H^1(X,\mathscr F_H)$ is defined as follows: given $f \in \mathscr F_M(X)$, we can locally lift to elements $\tilde f_i \in \mathscr F_G(U_i)$ for some cover $\{U_i \subseteq X\}_{i \in I}$. The elements $\tilde f_i|_{U_{ij}}$ and $\tilde f_j|_{U_{ij}}$ give two different lifts to $\mathscr F_G$ of the same element of $\mathscr F_M$, so there exists a unique element $\alpha_{ij} \in \mathscr F_H(U_{ij})$ such that
$$\alpha_{ij} \cdot f_j\big|_{U_{ij}} = f_i\big|_{U_{ij}}$$
for all $i, j \in I$. These $\alpha_{ij}$ then satisfy the cocycle condition \eqref{2}, giving the required element $df \in H^1(X,\mathscr F_H)$. As usual, one checks that this does not depend on the choice of the lifts $\tilde f_i$, nor on the choice of cover $\{U_i \subseteq X\}_{i \in I}$ over which such lifts are taken.
This defines the exact sequence, and it is immediate from the construction that the composition of two consecutive maps is trivial (maps everything to the base point). Exactness at $H^0(X,\mathscr F_M)$ follows more or less by definition too: if $\alpha_{ij}$ constructed above is of the form $h_i|_{U_{ij}} \cdot h_j^{-1}|_{U_{ij}}$ for elements $h_i \in \mathscr F_H(U_i)$, then the elements $h_i^{-1} \tilde f_i \in \mathscr F_G(U_i)$ all glue to a single lift $\tilde f \in \mathscr F_G(X)$ of $f$. For exactness at $H^1(X,\mathscr F_H)$ we argue similarly: if $\alpha_{ij} \in \mathscr F_H(U_{ij})$ become of the form $g_i|_{U_{ij}} \cdot g_j^{-1}|_{U_{ij}}$ in $\mathscr F_G$, then the elements $g_i \in \mathscr F_G(U_i)$ all descend to a common element $g \in \mathscr F_M(X)$. $\square$
Let me sketch a more fancy approach using modern technology, namely using sheaves of spaces (= homotopy types) instead of sheaves of sets. We're delooping $\mathscr F_H$ and $\mathscr F_G$ to get $B\mathscr F_H$ and $B\mathscr F_G$, sitting in a fibre sequence
$$\mathscr F_M \to B\mathscr F_H \to B\mathscr F_G$$
of sheaves of spaces on $X$. Global sections is given by $\mathscr F \mapsto \operatorname{Map}(*,\mathscr F)$ and therefore preserves (homotopy) limits, so it remains a fibre sequence after applying global sections. In this recent answer, I explained that $(B\mathscr G)(*)$ is the groupoid of $\mathscr G$-torsors, whose $\pi_0$ is therefore $H^1(X,\mathscr G)$ and whose $\pi_1$ is $H^0(X,\mathscr G)$.