We develop a model to study the locomotion of snakes on an inclined plane. We determine numerically which snake motions are optimal for two retrograde traveling-wave body shapes---triangular and sinusoidal waves---across a wide range of frictional parameters and incline angles. In the regime of large transverse friction coefficient, we find power-law scalings for the optimal wave amplitudes and corresponding costs of locomotion. We give an asymptotic analysis to show that the optimal snake motions are traveling-wave motions with amplitudes given by the same scaling laws found in the numerics.