I think the answer is yes. I try to prove the stronger statement that every such homeomorphism is of the form $S^{\mathbb{N}}=S^A\times S^B$ for a disjoint union $\mathbb{N}=A\amalg B$.
Let me switch the roles of 0,1. This makes the following more easily readable.
We can introduce a order on $S^w$ by defining $x\le y$, iff each open set containing $x$ also contains $y$. We can do the same for $X,Y$ and note that the homeomorphism induces an order preserving map.
Furthermore $S^w$ is a lattice, e.g. any subset of it has a least upper bound and a greatest lower bound. If a product of two orders is a lattice, so are the two factors.
Especially $S^w,X,Y$ have a unique minimal element 0. Let $f:X\times Y\rightarrow S^w$ denote the homeomorphism. Write $[a,b]$ for $\{c\mid a\le c\le b\}$. For products of orders we have $[(a_1,b_1),(a_2,b_2)]=[a_1,a_2]\times [b_1,b_2]$. Thus if $e_i$ is the characteristic function of $i\in \mathbb{N}$, we have $[0,e_i]$ has only the two elements $0,e_i$. Pick $(x,y)$ with $f(x,y)=e_i$. We then have:
$[0,e_i]=[f(0,0),f(x,y)]=f([0,x]\times [0,y])$ and hence exactly one of $[0,x]$ $[0,y]$ consists of two elements, and the other one of one element.
If $[0,x]$ consists of two elements, put $i$ into $A$ otherwise, put it into $B$.
$S^A=f(X\times 0)$ follows by writing any element in $S^A$ as a least upper bound of $e_i's$ and using that $f$ is compatible with least upper bounds. Analogously $S^B=f(0\times Y)$ follows.
Last we have to show that for an arbitrary element $g\in S^{\mathbb{N}}$
we have $g=f(x,y)$, where $f(x,0)=g_A,f(0,y)=g|_B$ and $g|_A$ is the function which agrees with $g$ on $A$ and is zero otherwise. This again follows since $f$ is compatible with least upper bounds and the least upper bound of $g|_A$ and $g|_B$ is $g$, and the least upper bounds of $(0,x)$ and $(0,y)$ is $(x,y)$.