Rests are positioned at the rhythmic position at the start of their duration, and not in the middle of beats as this can cause confusion over when the rest begins and ends. Rests are aligned with other items at the same rhythmic position.
The only exception is whole bar rests, which are positioned at the visual center of bars. This way, they are clearly distinguishable from half note and whole note rests that are followed by notes in the same bar.
Rests stay within the staff wherever possible. They do not move above or below the staff when the notes around them are very high or very low.
However, on staves with multiple voices, rests are placed higher on the staff, or above the staff, for up-stem voices and lower on the staff, or below the staff, for down-stem voices.
The precise vertical positioning of rests is limited, as their detailed shapes require specific positions relative to staff lines and staff spaces.