When I woke up this morning and picked up my phone, all of the widgets were gone from my home screens apart from Google Newsstand. My wallpaper had reset back to the default Nexus 5 wallpaper. I use Apex Launcher, so at first I thought that maybe the phone had switched back to the default launcher somehow, which would explain the empty home screens but that wasn't the case - I was still in Apex. When I went into Settings, under Accounts there was nothing listed apart from my main Google account. eBay, SoundCloud, OneDrive, Dropbox etc. were all gone.
I rebooted the phone, hoping that that would somehow fix things, but it started up in Safe Mode and of course, everything was still missing. I turned it off again and turned it back on and this time it booted into normal mode, but it was still messed up. I ended up doing a factory reset and reinstalling everything.
Any idea what might have caused this?