Here is an answer from Andrea Cianchi:
A form of Hölder's inequality in Orlicz spaces asserts that, if $f_1\in L^{A_1},\ldots,f_n\in L^{A_n}$, and $B$ is such that $$ A_1^{-1}(t)\cdots A_n^{-1}(t)\leq cB^{-1}(t) \quad \text{for $t\geq 0$},\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (*) $$ for some constant $c$, then $f_1 f_2\cdots f_n\in L^B$ and $$ \Vert f_1 f_2\cdots f_n\Vert_{L^B}\leq C\Vert f_1\Vert_{L^{A_1}}\cdots\Vert f_n\Vert_{L^{A_n}}, $$ for some constant $C$. If the domain has finite measure, then (*) is only required for sufficiently large $t$.
Now it $u_1,\ldots,u_n\in W^{1,n}$, then $u_i\in\exp L^{n'}$ for every $i$ (Trudinger's inequality). In view of the condition (*), with $A_i(t)=t^n$ and $A_j(t)=e^{t^{n'}}$ for $j\neq i$, the product rule yields that $$ \nabla(u_1\cdots u_n)\in L^P $$ if $$ t^{1/n}(\log t)^{1/n'}\cdots(\log t)^{1/n'}\leq cP^{-1}(t) $$ for large $t$ (if the domain has finite measure), where $(\log t)^{1/n'}$ appears ($n-1$)-times. Thus $P$ has to fulfill $$ t^{1/n}(\log t)^{\frac{(n-1)^2}{n}}\leq cP^{-1}(t) $$ so the best possible choice of $P$ is $$ P(t)=t^n(\log t)^{-(n-1)^2} $$ for large $t$. The divergence condition is only satisfied for $n=2$.