for 3-D rotations, it is often useful to note that $\pmb{\omega}$ is more properly represented as a skew-symmetric 2-tensor $\pmb{\Omega}$ such that $\pmb{\Omega}\cdot \pmb{u}= \pmb{\omega}\times \pmb{u}$ for any vector $\pmb{u}$.
the components of $\pmb{\Omega}$ and $\pmb{\omega}$ in any (right handed) orthonormal basis are related by $\omega_i = -\tfrac{1}{2}\epsilon_{ijk}\Omega_{jk}$ and $\Omega_{ij}=-\epsilon_{ijk}\omega_k$.
If $\pmb{e}_i$ is an intertial/fixed basis and $\pmb{e}'_i$ is the rotating basis, they are related linearly by some $\pmb{e}'_i=\pmb{R}\cdot \pmb{e}_i$ and the angular velocity tensor is $\pmb{\Omega} = \dot{\pmb{R}}\cdot \pmb{R}^{-1}$. If both bases are right-handed and orthonormal then $\pmb{R}$ is a special orthogonal tensor satisfying $\pmb{R}^T\cdot \pmb{I} \cdot \pmb{R} = \pmb{I}$ where $\pmb{I}$ is the euclidean metric/inner product (if we limit consideration to orthonormal bases then $\pmb{I}$ can be seen as the identity tensor and we often simply this relation as $\pmb{R}^T=\pmb{R}^{-1}$). All of this is simply to say that, letting $(\cdot)'$ denote coordinate vectors/matrix representations in the rotating $\pmb{e}'_i$ basis, then the Lagrangian for a free particle in 3-space is given in rotating coordinates $q'$ as
$$
L = \tfrac{1}{2}m (\dot{q}' + \Omega'\cdot q') \cdot I' \cdot (\dot{q}' + \Omega'\cdot q') \,=\, \tfrac{1}{2}m (\dot{q}' + \Omega'\cdot q')^2
$$
where the last equality assumes $\pmb{e}'_i$ is orthonormal such that $I'$ is the identity matrix. For any $n\times n$ matrix $A$ and $n$-tuple/column vector $x$, we have $\tfrac{\partial}{\partial x} (A\cdot x) = A$. It follow from the above and the chain rule, along with symmetry of $\pmb{I}$ and skew-symmetry of $\pmb{\Omega}$, that
$$
\tfrac{\partial}{\partial q'} L = m I'\cdot (\dot{q}' + \Omega'\cdot q')\cdot\Omega' = mI'\cdot \Omega'^T \cdot (\dot{q}' + \Omega'\cdot q') = -mI'\cdot \Omega' \cdot (\dot{q}' + \Omega'\cdot q')
$$
Using $\Omega \cdot u = \omega\times u$ this is equivalent to the expression you are seeking:
$$
\tfrac{\partial}{\partial q'} L = -mI'\cdot( \omega' \times \dot{q}' + \omega' \times (\omega'\times q')) = mI'\cdot( \dot{q}' \times \omega' - \omega' \times (\omega'\times q'))
$$
where, for your purposes, you can drop $I'$ as it is just the identity matrix.