It is because of the intense and unlikely turn his life has taken since the events of the first Iron Man film, compounded by the battle in New York City as seen in The Avengers. Consider that Tony Stark's life up until the first film was one of success and peace, where nothing was unbelievable or out of his control. Yet over the last few years he has fought terrorists, had to kill his once closest ally Obadiah Stane in self-defense, been secretly recruited by S.H.I.E.L.D. for a superhero team, brought in front of Congress, been targeted by Ivan Vanko and Justin Hammer, and had the government steal his technology. Things only escalated to an unlikely degree when Steve Rogers, one of his late father's friends, is found alive in a block of ice, and the existence of alien gods is discovered when Thor and Loki come to earth. Finally after an alien army tried to enslave humanity, Tony had a form of near-death-experience after he only barely managed to escape a closing wormhole to the other side the universe, as well as a nuclear explosion. Any handful of these things might be manageable, but all of them concurrently over a relatively short period of time has been a little too much for him to handle. The thought of his near-death and the near loss of his beloved Pepper Potts subconsciously effected Tony's well-being and confidence, and led to what can be post-traumatic stress disorder. Rather than confronting these new fears and doubts, Tony instead distracts himself by building almost fifty new armored suits that he believes can be used to protect Earth and everything he loves. His work becomes an escape from reality. He feels vulnerable and out of place when he is not spending time on his suits, and spends so much time and effort on this distraction that it begins to take its toll on his body and mind. His relationship with Pepper grows shaky, Tony's problems worsen, and he eventually begins to suffer from insomnia and night terrors, which then leads to his random and disturbing panic attacks.