What can I do to prevent waking up with a sore back and legs riding shotgun all night?

Stretch. Dtretch frequently. Try a lumbar roll or chair back seat support.