It is not harmful to consume aloe vera juice at night. However, you will not be able to get the full benefits of aloe vera at night.
The intestines are empty and relaxed in the morning, allowing the aloe vera to work correctly and give excellent benefits.
You can try jeera water or Ash gourd at night, if you really want.