I had the same issue with my new Nexus 5x, I did a factory reset and the issue went away. I was getting 2 days from my phone without charging. However 2 weeks on from the factory reset and the issue has reared it's ugly head again over the last few days.
It's really starting to tick me off, I...