He died at night and the funeral was not held until daybreak because the Rabbis were concerned that the massive attendance to a nighttime funeral procession would lead to injuries or worse.
The timing of the funeral was influenced by religious considerations, specifically the desire to avoid a large gathering at night that could pose safety risks.