Chosen Solution
So my nexus 5 works fine, at times, but somtimes i get a random black screen. The phone is still on, after a few seconds it comes back and its like nothing
I presume it is because of the sensor activation. Go to Settings-> Display & Lights. Disable Ambient Display; Double-tap to sleep.