Let $X \to k$ resp. $Y \to k$ be projective resolutions of $k$ over $kG$ resp. $kQ$. In short, the reason for the sign is the twist
$$T : X \otimes Y \to Y \otimes X,\; x \otimes y \mapsto (-1)^{ij} \cdot y \otimes x\quad,\quad x \in X_i, y \in Y_j.$$

In detail: First note that if $U \to k$ is a projective resolution of $k$ over $kG$ and $\Delta: U \to U \otimes U$ is a diagonal approximation, then (using Evens' sign conventions) cup-product $$Hom_G(U,M) \otimes Hom_G(U,N) \to Hom_G(U,M\otimes N)$$ is given as follows: Let $\Delta_{ij}: U_{i+j} \to U_i \otimes U_j$ be the $(i,j)$-component of $\Delta$. If $\Delta_{ij}(u) = u_i \otimes u_j$ then
$$(f \cup g)(u) = f(u_i) \otimes g(u_j).\hspace{80pt}(\ast)$$
Now let $\Delta_X: X \to X \otimes X$ and $\Delta_Y: Y \to Y \otimes Y$ be diagonal approximations. $X \otimes Y \to k$ is a projective resolution for $G$ (diagonal operation) and
$$\Delta: X \otimes Y \xrightarrow{\Delta_X \otimes \Delta_Y} X \otimes X \otimes Y \otimes Y
\xrightarrow{\;T\;} (X\otimes Y) \otimes (X \otimes Y)$$
is a diagonal approximation.

Let $x \in X_{i+j}$ and $y \in Y_{p+q}$. If $\Delta_{i,j}(x) = x_i \otimes x_j$ and $\Delta_{p,q}(y) = y_p \otimes y_q$ then
$$\Delta_{i+p,j+q}(x \otimes y) = T(x_i \otimes x_j \otimes y_p \otimes y_q) =(-1)^{jp}(x_i \otimes y_p) \otimes (x_j \otimes y_q).$$

Hence we have for the cup-product
$$\cup: Hom_G(X \otimes Y,M) \otimes Hom_G(X \otimes Y,N) \to Hom_G(X \otimes Y,M \otimes N)$$
$$(f \cup g) (x \otimes y) = (-1)^{jp} f(x_i \otimes y_p) \otimes g(x_j \otimes y_q).\quad\quad(1)$$

One can check that this product preserves the usual filtration and hence defines a product on the spectral sequence that is compatible with the product in the cohomology of $G$.

Since your pairing is a composition of the cup-product on $Q$ and on $H$, it can be seen from $(\ast)$ that no sign occurs there. Furthermore, using the isomorphism
$$Hom_G(X \otimes Y,-) \cong Hom_Q(Y,Hom_H(X,-))$$
of complexes, one obtains by definition checking - use $(\ast)$ - that your pairing is given on cochain level by
$$Hom_G(X \otimes Y,M) \otimes Hom_G(X \otimes Y,N) \to Hom_G(X \otimes Y,M \otimes N)$$
$$(f \cup g) (x \otimes y) = f(x_i \otimes y_p) \otimes g(x_j \otimes y_q).$$
This shows that the two products differ by the sign $(-1)^{jp}$.

**Remark:** The sign depends on the definition of the differential in the $Hom$-cocomplex (that influences $(\ast)$). See for example the paper [Hochschild, Serre: Cohomology of Group Extensions, Trans. Amer. Math. Soc. 74(1),1953, pp. 110-134] Chap. II, Theorem 3 for a different sign.

**Added:** To explicate this remark, consider the sign convention in Brown's group cohomology book. He uses $$\delta: Hom_G(U_n,M) \to Hom_G(U_{n+1},M),\; f \mapsto (-1)^{n+1}f \circ d_{n+1}.$$ This leads to the cup product
$$(f \cup g)(u) = (-1)^{ij} \cdot f(u_i) \otimes g(u_j)\hspace{80pt}(\ast')$$
Thus we obtain in place of $(1)$:
$$(f \cup g)(x \otimes y) = (-1)^{jp} (-1)^{(i+p)(j+q)} f(x_i \otimes y_p) \otimes g(x_j \otimes y_q)\quad\quad (1')$$
Let $F \in Hom_H(Y_p,Hom_Q(X_i,M))$ correspond to $f \in Hom_G( (X\otimes Y)_{i+p},M)$ and $G \in Hom_H(Y_q,Hom_Q(X_j,M))$ correspond to $g \in Hom_G( (X\otimes Y)_{j+q},N)$.
Then by $(\ast')$:
$$(F \cup_Q G)(y) = (-1)^{pq} \cdot F(y_p) \otimes F(y_q).$$
Thus we obtain for your pairing
$$(F \cup G)(y)(x) = (-1)^{pq} \big (F(y_p) \cup_H F(y_q) \big )(x)
= (-1)^{pq}(-1)^{ij} F(y_p)(x_i) \otimes F(y_q)(x_j).$$
Comparing with $(1')$ shows that the two products differ by the sign $(-1)^{iq}$, in accordance with Hochschild-Serre.