Well, generally speaking, according to your situation, I have to say that you may get Blepharitis. And there is nothing to do with night or day, blepharitis can occur, so you need to pay more attention to it. First, you should know that It is a common eye condition, causing the eyelids to be swollen and scaly-appearing at the base of the eyelashes. And when scales become coarser, the surface of the eye becomes irritated and forms crusts. And if this crust falls into your eye, you may feel like you have "something in your eye" and feel discomfort in your eyes. Also, you feel crusty in your eyes, just like what you said. And that can be caused by many factors, such as eye infection. For your situation, you should take some cold compresses at first, and then go and see the eye doctor as soon as possible.
In reality, getting crusty at night is a signal of seriously being short of water in your body. Besides, the immune system in your body decreases which indirectly cause the disorder of eye nerves. When you are sleeping at night, your eyes gland tear system may get pressure from the bad physique and excrete the dirty things which coming into the eyes. However, the gum in the eyes may become the sediment. Therefore, it's quite normal that you find that the eyes get crusty at night. In view of this situation, you'd better drink the hot water to open the throat system which may indirectly affect the eye nerves. What's more, you should eat the food with vitamin C during this time to moisture your eyes. Keep in mind that neither staying up late at night nor using air conditional all the time, or else your eyes may get even more dry.