The Torah says, "And you will see [the tzitzit] and you will remember all the commandments of G‑d." From this verse it was deduced that this mitzvah is relegated to the daytime--the natural time for seeing. Nighttime clothing is exempt from tzitzit.
One is not precluded from attaching tzitzit to a night garment, but the mitzvah of tzitzit can be performed only with daytime garb, and the blessing for tzitzit or tallit may only be recited during daylight hours.
Nevertheless, based on the mystical teachings, many are careful to wear tzitzit even during the night, and even while sleeping.