The mentally unstable gunman suspected of opening fire at a Waffle House restaurant in the middle of the night was arrested not far from his apartment Monday after hiding from police for more than a day following the attack that killed four people, authorities said.