This answer comes with a new style matrix dividers, which can be passed to a TikZ matrix. It will draw the dividing lines like in a tabular. This style makes use of the execute at end matrix key, which has not yet found its way into the manual. It also finds out the number of rows and columns, see this answer. Notice that this style is not designed for matrices with empty cells or very uneven cells, as these do not occur here. However, it is possible (and not too difficult) to extend this style to this case, too.
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{matrix,calc,positioning}
\definecolor{dgreen}{RGB}{72,127,30}
\makeatletter
\tikzset{matrix dividers/.style={execute at end matrix={
\foreach \XX in {2,...,\the\pgf@matrix@numberofcolumns}
{\draw[#1] ($(\tikz@fig@name-1-\XX)!0.5!(\tikz@fig@name-1-\the\numexpr\XX-1)$)
coordinate (aux) (aux|-\tikz@fig@name.north)
-- (aux|-\tikz@fig@name.south);
}
\foreach \XX in {2,...,\the\pgfmatrixcurrentrow}
{\draw[#1] ($(\tikz@fig@name-\XX-1)!0.5!(\tikz@fig@name-\the\numexpr\XX-1\relax-1)$)
coordinate (aux) (aux-|\tikz@fig@name.west)
-- (aux-|\tikz@fig@name.east);
}
}},matrix frame/.style={execute at end matrix={
\draw[#1] (\tikz@fig@name.south west) rectangle (\tikz@fig@name.north east);
}}}
% from https://tex.stackexchange.com/a/386805/121799
\def\tikz@lib@matrix@empty@cell{\iftikz@lib@matrix@empty\node[name=\tikzmatrixname-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn,empty node]{};\fi}
\makeatother
\tikzset{matrix of mathsf nodes/.style={%
matrix of nodes,
nodes={%
execute at begin node=$\mathsf\bgroup,%
execute at end node=\egroup$%
}%
}}
\begin{document}
\begin{tikzpicture}[nmat/.style={matrix of mathsf nodes,inner sep=0pt,nodes in empty cells,column sep=-\pgflinewidth,
row sep=-\pgflinewidth,nodes={text height=1.7ex,text depth=0.2ex,inner
sep=2pt,minimum width=1.8ex},matrix dividers={thin},matrix
frame={thick}},font=\sffamily,
empty node/.style={fill=none}]
\matrix[nmat,nodes={fill=yellow}] (mat1) {
1& & 3 & & & 5 & & & 5 & & 4 & \\
& & 5 & 4 & & & 4& & & 2 & 1 & 3 \\
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \\
& 2& 4 & & 5 & & & 4 & & & 2& \\
& & 4 & 3 & 4 & 2 & & & & & 2 &5 \\
1 & & 3 & & 3 & & & 2& & & 4& \\
};
\node[below=0.2ex of mat1,scale=2.5,dgreen] {$\mathsf{R}$};
\node[rotate=90,left=1.3ex of mat1,xshift=3em,dgreen] {items};
\node[above=0ex of mat1,xshift=1em,dgreen] {users};
\node[right=0.1ex of mat1,scale=2] (approx) {$\approx$};
\matrix[nmat,right=0.1ex of approx] (mat2) {
& & \\
& & \\
& & \\
& & \\
& & \\
& & \\
};
\node[rotate=90,left=1.3ex of mat2,xshift=-1em,dgreen] {items};
\node[above=0ex of mat2,dgreen] {factors};
\node[below=0.2ex of mat2,scale=2.5,dgreen] {$\mathsf{Q}$};
\node[right=0.1ex of mat2,scale=2] (cdot) {$\times$};
\matrix[nmat,right=0.1ex of cdot] (mat3) {
& & & & & & & & & & & \\
& & & & & & & & & & & \\
& & & & & & & & & & & \\
};
\node[rotate=-90,right=1.5ex of mat3,xshift=-2em,dgreen] {factors};
\node[above=0ex of mat3,dgreen] {users};
\node[below=0.2ex of mat3,scale=2.5,dgreen] {$\mathsf{P^T}$};
\end{tikzpicture}
\end{document}

Update: added the very nice \tikz@lib@matrix@empty@cell trick from this answer.
tableenvironments in your MWE. – Zarko Jun 25 '19 at 03:09nicematrixone must writecinstead ofCin the preambles of the{NiceArray}(but there is an option for backward compatibility). – F. Pantigny Jul 18 '20 at 21:16