The beautiful scenery, watched by the eyes, together with the physical motion, produces endorphins. The endorphins generate a feeling of happiness which casts out pains. :-)
There are no better means against pains than pleasure and movement!
...and it works best, if you believe in this! :-)))