In this paper, we present an efficient approach to compute the integral of monomials and polynomials over polyhedra and regions defined by parametric curved boundary surfaces. We use Euler's theorem for homogeneous functions in combination with Stokes's theorem to reduce the integration of a monomial over a three-dimensional solid to its boundary. If the solid is a polytope, through a recursive application of these theorems, the integral is further reduced to just the evaluation of the monomial and its derivatives at the vertices of the polytope. The present approach is simpler than existing techniques that rely on repeated use of the divergence theorem, which require the antiderivative of the monomials and the projection of these functions onto hyperplanes. For convex and nonconvex polytopes, our approach does not introduce any approximation for the integration of monomials. For curved solid regions bounded by surfaces that admit a parameterization, the same approach yields simplified formulas to compute the integral of any homogeneous function, including monomials. For surfaces parameterized by polynomial surfaces (such as Bézier surface triangles and B-spline patches), the method yields machine-precision accuracy for the volumetric integration of monomials with an appropriate quadrature rule. Numerical examples over regions bounded by polynomial surfaces and rational surfaces are presented to establish the accuracy and efficiency of the method.