The man ran away after wounding Grammer in the right arm and her friend in the lower back with an unknown sharp object, police said. No arrests have been made.
Grammer, who provides the voice of Summer on Rick and Morty and previously starred on the ABC Family series Greek, is the daughter of Frasier star Kelsey Grammer and actress Doreen Alderman.
Grammer said she and her friend both expect to recover quickly. Neither suffered serious internal injuries, she said.
In her statement to US Weekly, Grammer thanked the first responders and Bellevue Hospital staff who treated them and noted the "incredible battle" those workers have fought against the coronavirus pandemic.
"It was very moving for us to have the opportunity to thank them in person."