Not sure where the OP is located, but In the US, it’s not “illegal” to fly at night as a hobbiest.
That said, flying at night is actually easier to determine orientation as it’s easier to see the LED markings on the drone, especially if you add aftermarket strobes. This makes VLOS flying even...