Why is my iPhone 5 screen non responsive and will not restore through iTunes?

I upgraded my iPhone system to iOS9 and then my phone become non-responsive. i cannot unlock my phone or do anything. I have been trying to restore the phone as i thought it may be that but then iTunes keeps saying a time out error occurred and cannot restore the phone. I don't know what else to do.
Put the phone in recovery mode, connect it to your computer, and then restore it via iTunes.

Original thread: https://forums.imore.com/threads/why-is-my-iphone-5-screen-non-responsive-and-will-not-restore-through-itunes.342490/