Dear Alex Becker, 

You can find the answer to your question in the excellent survey "Rational billiards and flat structures" of H. Masur and S. Tabachnikov: for a free online version see here (http://math.uchicago.edu/~masur/handbook.dvi). 

As you can check in this survey, it is not very hard to deduce the singularity pattern of q from the angles of a rational $k$-gon $P$. Indeed, for each $j=1,\dots,k$, let $v_j$ be the $j$th vertex of $P$, let $\pi m_j/n_j$ be the angle around $v_j$ (where $m_j$ and $n_j$ are coprime), and let $N$ be the least common multiple of $n_j$'s. From the arguments on the survey (see Lemma 1.2 of the .dvi online version), after the unfolding procedure (of reflecting sides), $v_j$ gives rise to $N/n_j$ points with total angle $2\pi m_j$. Thus, the Abelian differential $\omega$ induced by $dz$ on $P$ has a zero of order $m_i-1$ on each of these points, that is, its stratum is 
$$\mathcal{H}(\underbrace{m_1-1,\dots,m_1-1}_{N/n_1},\dots,\underbrace{m_k-1,\dots,m_k-1}_{N/n_k})$$ In particular, the quadratic differential $q=\omega^2$ belongs to the stratum 
$$\mathcal{Q}(\underbrace{2(m_1-1),\dots,2(m_1-1)}_{N/n_1},\dots,\underbrace{2(m_k-1),\dots,2(m_k-1)}_{N/n_k})$$
because every time $\omega$ has a zero $x$ of order $a$, it is written locally near $x$ as $\omega=z^a dz$, so that $q:=\omega^2=z^{2a}dz^2$ locally near $x$.

Just for "double check", the genus is given by the formula 
$$2g-2=\sum \textrm{ orders of zeroes of }\omega$$
or equivalently, 
$$4g-4=\sum \textrm{ orders of zeroes of }q$$
for $q=\omega^2$. By applying this formula to the unfolding of $P$, we get that the genus satisfies 
$$2g-2=\sum(m_j-1)N/n_j$$
Since the sum of the inner angles of $P$ is $\pi(k-2)$, we have that $\sum m_j/n_j=k-2$ and thus the previous equation becomes
$$2g-2=N(k-2-\sum(1/n_j))$$
that is exactly the same formula for the genus as in the survey. Of course, by multiplying everything in this equation we get the correct corresponding statement for the quadratic differential $q$.

Finally, concerning the triangle associated to the octagon, I think you wish to unfold the triangle with angles $\pi/8, \pi/2, 3\pi/8$ and not $\pi/4,3\pi/8,3\pi/8$: indeed, by unfolding the first you get a nice octagon but by unfolding the second you get two copy of the octagon (that is, a Riemann surface that is not connected) and this explains why your comment doesn't contradict the facts claimed in the survey. 

Best regards,

Matheus