What do you mean by “can do integration by part”? You can always do that. If you are asking about the application of Stokes’ theorem, then one can say few words about it. Basically, it is all about the topological properties of \partial\Omega. In order to avoid complications, which can arise from the “corners” of \partial\Omega, one can take \partial\Omega to be a “tube” consisting of two spacelike hypersurfaces \Sigma_{t_{1}} and \Sigma_{t_{2}} having the same topology, and a connecting timelike element \mathcal{T}
\partial\Omega = \Sigma_{t_{1}} \cup \Sigma_{t_{2}} \cup \mathcal{T} .
It is usually assumed that spacetime is foliated into spacelike hypersurfaces (\Sigma_{t})_{t \in \mathbb{R}} defined by x^{0}= t = \mbox{constant}, where t : M^{(1,n-1)} \to \mathbb{R} is a well defined time function throughout space time M^{(1,n-1)}= \bigcup_{t \in \mathbb{R}}\Sigma_{t}.
(\Sigma_{t_{1}} and \Sigma_{t_{2}} are the initial and final Cauchy surfaces). This induces another foliation on the boundary element \mathcal{T}= \mathbb{R} \times \mathcal{S}^{(n-2)}, where \mathcal{S}^{(n-2)} are (n-2)-dimensional spacelike surfaces given by \mathcal{S}^{(n-2)} = \partial \Sigma_{t} = \Sigma_{t} \cap \mathcal{T}. (The boundary \partial \Sigma_{t} of each \Sigma_{t} (leaf) lies in the boundary element \mathcal{T}; the intersections of \Sigma_{t} leaves with \mathcal{T} induce a foliation of \mathcal{T})
The surface element differential d\Sigma_{\mu} on \partial \Omega is given by
d\Sigma_{\mu} = d\Sigma \ n_{\mu} = d^{n-1}x \ \sqrt{|g^{(n-1}|} \ n_{\mu} , where d\Sigma is “volume” form on \partial\Omega, that is to say that the \epsilon-tensor on \partial\Omega is given by \epsilon_{\mu_{1}\mu_{2}\cdots \mu_{n-1}} = n^{\nu}\epsilon_{\nu \mu_{1}\mu_{2}\cdots \mu_{n-1}},
n^{\mu} is the outward pointing normal to \partial\Omega, and g^{(n-1)} is the determinant of the induced metric on \partial\Omega. Now, we have all the ingredients to do Stokes’ theorem
\int_{\Omega \subset M} \epsilon \ (\nabla_{\mu}V^{\mu}) = \int_{\partial \Omega} (\epsilon \cdot V) , or, explicitly
<br />
\begin{align*}<br />
\int_{\Omega} d^{n}x \ \sqrt{|g|} \ \nabla_{\mu}V^{\mu} &= \int_{\partial\Omega} d^{n-1}x \ \sqrt{|g^{(n-1)}|} \ n_{\mu}V^{\mu} \\<br />
&= \left( \int_{\Sigma_{t_{1}}} + \int_{\Sigma_{t_{2}}} + \int_{\mathcal{T}} \right) d^{n-1}x \ \sqrt{|g^{(n-1)}|} \ n_{\mu}V^{\mu} .<br />
\end{align*}<br />
Okay, now take
<br />
\begin{align*}<br />
n_{\mu}(\Sigma_{t_{1}}) &= (-1, 0, 0, \cdots , 0) \\<br />
n_{\mu}(\Sigma_{t_{2}}) &= (1, 0, 0, \cdots , 0) , \ \mbox{and} \\<br />
n_{\mu}(\mathcal{T}) &= (0, 1, 1, \cdots , 1) ,<br />
\end{align*}<br />
and use \mathcal{T} = \mathbb{R} \times \mathcal{S}^{(n-2)} to obtain
<br />
\begin{equation*}<br />
\begin{split}<br />
\int_{\Omega} d^{n}x \ \sqrt{|g|} \ \nabla_{\mu}V^{\mu}(x) =& \int_{\Sigma_{t_{1}}}^{\Sigma_{t_{2}}} d^{(n-1}\vec{x} \ \sqrt{|g^{(\Sigma_{t})}|} \ V^{0}(x^{0} , \vec{x}) \\<br />
& + \int_{t_{1}}^{t_{2}} dx^{0} \ \int d^{(n-2)}\vec{x} \ \sqrt{|g^{(\mathcal{S})}|} \ n_{j}V^{j}( x^{0}, \vec{x}) .<br />
\end{split}<br />
\end{equation*}<br />
If the vector V^{\mu} is built out of physical fields, we are most likely to having
|\vec{x}|^{n-2} V^{j} \to 0 , \ \ \mbox{as} \ \ |\vec{x}| \to \infty . Therefore
\int_{\Omega} d^{n}x \ \sqrt{|g|} \ \nabla_{\mu}V^{\mu}(x) = \int_{\Sigma_{t_{1}}}^{\Sigma_{t_{2}}} d \vec{x} \ \sqrt{|g^{(\Sigma_{t})}|} \ V^{0}(t , \vec{x}) . Furthermore, if it is covariantly conserved \nabla_{\mu}V^{\mu}=0, we obtain a time-independent charge
<br />
\begin{align*}<br />
Q(t) &= \int_{\Sigma_{t_{1}}} d \vec{x} \ \sqrt{|g_{(\Sigma_{t})}|} \ V^{0}(t,\vec{x}) \\<br />
&= \int_{\Sigma_{t_{2}}} d \vec{x} \ \sqrt{|g_{(\Sigma_{t})}|} \ V^{0}(t,\vec{x}) \\<br />
&= \int_{\Sigma_{t}} d \vec{x} \ \sqrt{|g_{(\Sigma_{t})}|} \ V^{0}(t,\vec{x}) .<br />
\end{align*}<br />
All of this should be familiar from Noether theorem and/or from the word go in general relativity. The starting statement in GR is that of the invariance of the H-E action under the group of general coordinate transformations, i.e. under a diffeomorphism generated by the Lie derivative along a vector field \xi^{\mu} that is tangent to the boundaries:
<br />
\mathscr{L}_{\xi} \left( \int_{\Omega} d^{4}x \sqrt{|g|} R \right) = \int_{\Omega} \mathscr{L}_{\xi} (d^{4}x \sqrt{|g|}) R + \int_{\Omega} d^{4}x \ \sqrt{|g|} \mathscr{L}_{\xi}(R) ,<br />
or
<br />
\begin{align*}<br />
\delta S &= \int_{\Omega} d^{4}x \sqrt{|g|} \left( R \nabla_{\mu}\xi^{\mu} + \xi^{\mu} \nabla_{\mu}R \right) \\<br />
&= \int_{\Omega} d^{4}x \ \nabla_{\mu}(\xi^{\mu} \sqrt{|g|}R) .<br />
\end{align*}<br />
Using, Stokes' theorem, we get
<br />
\begin{equation*}<br />
\begin{split}<br />
\delta S =& \int_{\Sigma_{1}}^{\Sigma_{2}} d^{3}x \sqrt{|g^{(3)}(\Sigma)|} \ ( n_{\mu} \xi^{\mu} ) R \\<br />
& + \int_{\mathcal{T}} d^{3}x \sqrt{|g^{(3)}(\mathcal{T})|} \ ( n_{\mu} \xi^{\mu}) R ,<br />
\end{split}<br />
\end{equation*}<br />
And this vanishes because of (\xi^{\mu}n_{\mu})|_{\partial \Omega} = 0.