By default, the text is aligned at the center of the axis. To rotate axis labels to vertical, use the following code:
theme(axis.text.x = element_text(angle = 90, hjust = 1)
where angle rotates the text, and hjust controls horizontal justification.
In your case: