According to the New York tenants rights guide, either party in a month to month tenancy may terminate the arrangement with 30 days notice.

Did either of them give 30 days notice?

Since the apartment is rent stabilized, you may have a right of succession

Are family members protected from eviction when the tenant dies or permanently leaves the apartment? What is the definition of "family member"?

Generally, succession rights are afforded to family members who have resided as a primary resident in the apartment for at least two years (one year for family members who are senior citizens or disabled) prior to the death of, or the permanent vacating of, the apartment by the tenant.

A "family member" is defined as a husband, wife, son, daughter, stepson, stepdaughter, father, mother, stepfather, stepmother, brother, sister, grandfather, grandmother, grandson, granddaughter, father-in-law, mother-in-law, son-in-law or daughter-in-law of the tenant.

The definition of a family member also includes any other person residing with the tenant in the housing accommodation as a primary resident, who can prove emotional and financial commitment and interdependence between such person and the tenant. See Fact Sheet #30.

http://www.dhcr.state.ny.us/ora/faqs.htm#ol10
Go have a look at Fact Sheet 30, linked above. It has a link to Form RA-23.5, required to exercise lease succession rights (if you have them), as well as links to the DHCA Rent Info Line and contacts for Borough and County Rent offices.

Good luck.