I have had my S5 for over a year and I don't have a cover on it and I never have. Lately each time I put it down or take it out of my pocket it restarts
Welcome to Android Central! Try wiping the cache partition: http://support.t-mobile.com/docs/DOC-10404. If that doesn't help, try Safe Mode, which disables all 3rd party apps. Steps are at the bottom of that linked article.
If it keeps restarting, it's possible the Power button is faulty--you'd have to bring it to a repair shop to check (or if it's under warranty, contact Samsung).