Did this start after a software update? In that case, resetting your iPhone should help:
Press and hold Home and Power button simultaneously until the Apple logo appears. Let go of both, your device will power up on it's own.
The latest software for your iPhone is 8.4.1. Update it, if it's running an older software version. This might fix your problem as well.
Maybe resetting it to factory settings will help. Make sure there's a most recent backup, to iCloud or iTunes, whichever you prefer.
It could also be a hardware problem. Maybe the battery needs to be changed. The best way to find out whether or not that's the case, would be to make an appointment at the next Apple Retail Store, and let them take a look at your iPhone.