Yes, you can absolutely take it at night. In fact, taking it after dinner helps if it makes you feel nauseous during the day. Just take it with water and be consistent with the time.
Honestly night time was the only time I remembered to take it! Doing it in the morning meant I'd just forget or throw it up anyway. Just pop it after dinner and sleep it off, much easier.
My doctor told me to take it after dinner, and I used to have a little warm milk or ginger tea after that to soothe my stomach. It is completely safe at night. But yes, always confirm with your doctor first if you feel any unusual stomach pain or heavy vomiting.
I used to take my thyroid medicine in the morning and my doctor told me to take folic acid at night so they don't interfere. It's totally fine to take it at night. Just make sure you are regular with your doctor follow-ups to adjust your prenatal routine.