Table follows on another page

I am trying to create a sidewaystable table in my appendix. The table (hardly) fits on the page and but is located on the next page. Does someone have a hint for me?

Here is my minimal preamble and the lines for the table.

\documentclass[review,preprint,11pt,authoryear]{elsarticle}
\usepackage{graphicx}
\usepackage{booktabs,tabularx,ctable,array,multirow,hyperref,lineno}
\usepackage{textcomp,amssymb,amsmath,textcomp}
\usepackage{longtable,caption,rotating,geometry}
\usepackage{lmodern,makecell,tablefootnote}
\setlength{\tabcolsep}{3.5pt}

\geometry{
a4paper,
total={160mm,257mm},
left=20mm,
top=18mm,
}

\captionsetup[longtable]{%
labelfont={small,it} ,
textfont={small,it}     ,
position=top            ,
belowskip=0pt           ,
aboveskip=4pt
}

\newcommand{\tab}{\hspace{5mm}}

\begin{document}
\appendix
\newpage
\section{} \label{s:wrapping}

\begin{sidewaystable}[h]
\begin{small}
\caption{Mathematical descriptions of the geometrical forms of the wrapping surfaces}
\label{t:geometry}
\begin{tabular}{lc|cccc|ccc|ccc|ccc|ccc|ccc|ccc}
\toprule[0.035cm]
muscle &form &r &rx &ry &rz &\multicolumn{3}{c}{ps} &\multicolumn{3}{c}{pe}    &\multicolumn{3}{c}{pc} &\multicolumn{3}{c}{nx} &\multicolumn{3}{c}{ny} &\multicolumn{3}{c}{nz} \\
& & & & & & x &y &z & x &y &z & x &y &z & x &y &z & x &y &z & x &y &z \\
\midrule[0.035cm]

serratus anterior               &ellipsoid &          &0.137 &0.11 &0.22 &            &           &          &           &           & &0   &-0.132&0.897  &0.9945 &0 &-0.1045 &0 &1 &0 &0.1045 &0  &0.9945 \\
serratus posterior superior    &cylinder &0.04 &         &        &       &-0.0300 &-0.0800 &1.0300 & 0.0166  &-0.1732   &1.1077  &     &           &          & & & & & & & & & \\
trapezius               &cylinder &0.012 &         &        &       &-0.0850  &-0.0370  &1.0400    &-0.0486  &-0.1179  &1.1209  &     &           &          & & & & & & & & & \\

\bottomrule[0.035cm]
\end{tabular}
\end{small}
\end{sidewaystable}
\end{document}

• sidewaystables are always placed on a separate page, you'll need to use some other technique if you want to avoid that. See if Ulrike's answer at tex.stackexchange.com/a/69287/586 helps. – Torbjørn T. Nov 1 '16 at 16:15
• Rotating the table is the same. The table is still on the second page. Is there maybe other method of doing this? – Rıza Bayoğlu Nov 1 '16 at 18:39
• Yes, I see. I don't actually know what is causing that. Is your actual table wider by the way? Because the one you show fits in a page without rotation. (Also, don't use vertical rules when you have \toprule/\midrule/\bottomrule from booktabs.) – Torbjørn T. Nov 1 '16 at 18:53
• Yes, it is wider. I updated my post filling the table with its right content. It fits in a page, I have no problem with that. What do you suggest instead of using vertical rules? – Rıza Bayoğlu Nov 1 '16 at 19:23
• \cmidrule(lr){3-6} and similar to distinguish the groups, as in e.g. tex.stackexchange.com/questions/238503/… and tex.stackexchange.com/questions/18092/…. To fit that in the same page as the \section you need to reduce the size somehow. Restructure, reduce \tabcolsep and fontsize, or (worst case) use \scalebox/\resizebox (see tex.stackexchange.com/questions/332902/…). – Torbjørn T. Nov 1 '16 at 19:44