An online statement issued by the embassy on Tuesday, said: "Following the attack on the US embassy on March 18 and the April 6 attack on the Hadda residential compound in Sanaa, the department of state has ordered the departure of non-emergency embassy staff and family members from Yemen.
"Embassy employees are not authorised to travel outside of Sanaa and have been advised to avoid hotels, restaurants, and tourist areas and to strictly limit their exposure in public places until further notice."
The March 18 attack refers to an incident where mortar shells were fired at the embassy, killing a child and a policeman.
More than a dozen people were wounded.
The statement also urged Americans living in Yemen to "exercise caution and take prudent security measures, including maintaining a high level of vigilance, avoiding crowds and demonstrations, keeping a low profile, varying times and routes for all travel".
Sunday's attack was the latest to hit Yemen, amid a deteriorating security situation in which government forces are struggling to contain internal unrest.
Last week, demonstrations were staged by thousands of former army officers, political activists and unemployed men who have accused the government of discrimination and unequal treatment.