It is very annoying as it has only recently started to happen.
Interestingly I noted mine doing this quite badly today. My iPhone 5s was in my right jeans pocket at the time. Tried it loosely caried in my top shirt pocket, didn't do it, nor did it do it while it sat in the dash cubby.
So almost certainly seems to be related to being in close proximity to your body.
The only cure would appear to be not to carry your phone in your trouser pockets. Not much help I know....