When he can't cum...

My boyfriend couldn't cum during sex and couldn't stay hard long and he said it was because he hasn't been getting enough sleep, he really hadn't had much sleep in the last few days. Does lack of sleep usually effect men like that?