  Let $D\geq 1$ and $q\geq 3$ be two integers. Let $H(D)=H(D,q)$ denote the
$D$-dimensional Hamming graph over a $q$-element set. Let ${\mathcal T}(D)$
denote the Terwilliger algebra of $H(D)$. Let $V(D)$ denote the standard
${\mathcal T}(D)$-module. Let $\omega$ denote a complex scalar. We consider a
unital associative algebra $\mathfrak K_\omega$ defined by generators and
relations. The generators are $A$ and $B$. The relations are $A^2 B-2 ABA +B
A^2 =B+\omega A$, $B^2A-2 BAB+AB^2=A+\omega B$. The algebra $\mathfrak
K_\omega$ is the case of the Askey-Wilson algebras corresponding to the
Krawtchouk polynomials. The algebra $\mathfrak K_\omega$ is isomorphic to ${\rm
U}(\mathfrak{sl}_2)$ when $\omega^2\not=1$. We view $V(D)$ as a
$\mathfrak{K}_{1-\frac{2}{q}}$-module. We apply the Clebsch-Gordan rule for
${\rm U}(\mathfrak{sl}_2)$ to decompose $V(D)$ into a direct sum of irreducible
${\mathcal T}(D)$-modules.
