Rotated math with correct font size

In these cases it's much easier if you use \text:

\documentclass{article}

\usepackage{amsmath,graphicx}

\newcommand{\rot}[1]{%
  \text{\rotatebox[origin=c]{-90}{$\mathbf{#1}$}}%
}

\begin{document}

$\rot{0}, x_{\rot{0}}$

$\rot{1}, x_{\rot{1}}$

$\rot{8}, x_{\rot{8}}$

\end{document}

This hides \mathpalette in a user friendly way.

enter image description here

A possible refinement is to do

\newcommand{\rot}[1]{%
  \text{%
    \setlength{\mathsurround}{0pt}%
    \rotatebox[origin=c]{-90}{$\mathbf{#1}$}%
  }%
}

in order to be on the safe side if some document class sets the math surround parameter.

It's briefer with

\makeatletter
\newcommand{\rot}[1]{%
  \text{\m@th\rotatebox[origin=c]{-90}{$\mathbf{#1}$}}%
}
\makeatother