The man was armed with an AR-15 style assault rifle when he entered the Waffle House in Antioch, a suburb of Nashville, police said.
A customer wrestled the weapon from the gunman, who then fled the scene.
Six people were shot in total, including two who were killed in the car park outside the restaurant.
The gunman then opened fire on customers inside the Waffle House, killing one and wounding another, who later died.
The more were wounded and are being treated at Vanderbilt University Medical Centre.
Nashville police hailed the customer who pulled the rifle from him as a "hero".
James Shaw Jr
Police spokesman Don Aaron said: "The shots had stopped so he decided to rush the gunman, actually wrestled that assault rifle away, tossed it over the counter and, at that point, the gunman fled."
The 29-year-old customer saved many lives, he added.
The gunman entered the Waffle House restaurant shortly before 3.30am local time.
In a statement, police said he "was nude and fled on foot."
The suspect was wearing nothing but a green jacket, which he removed before fleeing.
Officers described the man as white, with short hair.
The gunman's vehicle was registered to Travis Reinking, a 29-year-old from Morton, Illinois, who police identified as a person of interest.
Police were searching for the man early on Sunday and it was unclear if he was armed with another weapon.
A man believed to be Reinking was last seen on Mountain Springs Drive near the Waffle House, wearing black trousers and no shirt, police said.
They have urged the public to be vigilant and warned that he is to be considered still armed and extremely dangerous.