I don't see why it would be illegal, other than if you had too many people than what normal occupancy limits would allow. For example, a small gathering of ten people would not be a problem, but 50 people might be. I can't give a specific number as the size and layouts of apartments vary. Also, it might depend if this happens only occasionally or every week. If the latter, you might wish to check with the fire, housing and building departments to see what the limitations are.
While religious expression is one thing, safety regulations might trump that.
The Tenant Network(tm) for Residential Tenants Information from TenantNet is from experienced non-attorney tenant activists and is not considered legal advice. Subscribe to our Twitter Feed @TenantNet