**Introduction**

I've included a diagram below.

You will note that, as CaptainBlack correctly said, for equilibrium the weight of the object must be directly over the point of contact.

In the diagram, you can see that $\displaystyle O$ is the point that would be the centre of the flat face of the hemisphere, $\displaystyle OS$ is the axis of rotational symmetry of the original hemisphere, $\displaystyle P$ is the point of contact with the inclined plane and $\displaystyle C$ is the location of the centre of mass of the hemispherical object.

**Geometry**
$\displaystyle CP$ is a vertical line and since $\displaystyle OP$ is at right angles to the inclined plane we must have that the angle $\displaystyle OPC$ is $\displaystyle \alpha$. Also the angle that the flat face of the hemisphere makes with the horizontal is the same as the angle between $\displaystyle OS$ and the vertical i.e. we need to find the angle $\displaystyle PCS$. Let this angle, $\displaystyle PCS$, be $\displaystyle \theta$.

Using the sine rule for the triangle $\displaystyle PCO$, we find that

$\displaystyle \frac{\sin (\pi - \theta)}{r} = \frac{\sin \alpha}{OC}$

since $\displaystyle OP = r$. Since we know $\displaystyle \theta$ is acute we can rearrange this so

$\displaystyle \color[rgb]{0,0,1} \boxed{\theta = \arcsin \left[ \frac{r}{OC} \sin \alpha \right]}$.

So all we need to do is determine $\displaystyle OC$.

**Dimensions of the cube**
The greatest cube that can be cut out of the hemisphere has its centre on $\displaystyle OS$ and so if we imagine expanding a small cube centred directly on top of $\displaystyle O$ we will no longer be able to expand it when its height is such that its four other corners touch the curved surface of the hemisphere. This cube then has one face in the same plane as the flat surface of the hemisphere and the opposite face's corners touching the curved suface. At any one of these corners that meet the curved surface the distance from $\displaystyle O$ must be $\displaystyle r$ so using Pythagoras Theorem we must have

$\displaystyle r^2 = a^2 +l^2$

where $\displaystyle a$ is the side length of the cube and $\displaystyle l$ is the distance from $\displaystyle O$ to the corresponding corner of the cube that lies in the plane of the flat surface of the hemisphere.

Again using Pythagoras we must have (for a cube) that

$\displaystyle l^2 = \left( \frac{a}{2} \right)^2 + \left(\frac{a}{2} \right)^2$,

hence

$\displaystyle r ^2 = a^2 + 2 \left(\frac{a}{2} \right)^2$,

$\displaystyle \color[rgb]{0,0,1} \boxed{\iff a = \sqrt{\frac{2}{3}} r}$.

**Centre of mass calculation**
I'm going to assume that you know the result that the centre of mass of a uniform hemispherical solid is on the rotational axis of symmetry at $\displaystyle 3/8 r$ from $\displaystyle O$.

Let $\displaystyle \rho$ be the density of the solid, $\displaystyle m$ the mass and $\displaystyle \mu$ be the distance of the centre of mass from $\displaystyle O$ on $\displaystyle OS$ where the solid referred to is denoted by the subscripts $\displaystyle h$, $\displaystyle c$ and $\displaystyle hc$ for hemisphere (uncut), cube and hemisphere with cube cut out respectively.

Then we must have (in terms of moments about $\displaystyle O$) that

$\displaystyle m_{hc} \mu_{hc} + m_c \mu_{c} = m_h \mu_h$

and thus we can determine $\displaystyle \mu_{hc}$ since

$\displaystyle m_{h} = \frac{2}{3} \pi r^3 \rho$,

$\displaystyle \mu_{h} = \frac{3}{8} r$,

$\displaystyle m_{c} = \rho a^3 = \frac{2}{3} \sqrt{\frac{2}{3}} \rho r^3$,

$\displaystyle \mu_{c} = \frac{a}{2} = \frac{1}{\sqrt{6}} r$,

$\displaystyle m_{hc} = m_{h} - m_{c} = \frac{2}{3} \pi r^3 \rho -\frac{2}{3} \sqrt{\frac{2}{3}} \rho r^3 = \frac{2}{3} \left( \pi -\sqrt{\frac{2}{3}} \right) \rho r^3$.

So we have

$\displaystyle \mu_{hc} = \frac{m_{h} \mu_{h} - m_c \mu_c }{m_{hc}}

=\frac{\left( \frac{2}{3} \pi r^3 \rho \right) \cdot \left( \frac{3}{8} r \right)

- \left(\frac{2}{3} \sqrt{\frac{2}{3}} \rho r^3\right) \cdot \left( \frac{1}{\sqrt{6}} r\right)}{\frac{2}{3} \left( \pi -\sqrt{\frac{2}{3}} \right) \rho r^3}

= \frac{\frac{3}{8} \pi -\frac{1}{3}}{\pi -\sqrt{\frac{2}{3}}} r $,

$\displaystyle = \frac{9 \pi - 8}{8 \left(3 \pi - \sqrt{6} \right)} r $

with $\displaystyle OP = \mu_{hc}$.

**Putting it together**

Substituting our value of $\displaystyle OP$ into our trigonometric result gives us that

$\displaystyle \color[rgb]{1,0,1} \boxed{\theta = \arcsin \left[ \frac{8 \left(3 \pi - \sqrt{6} \right)}{9 \pi - 8} \sin \alpha \right]}$.