In the old times men had to spend the previous night awake before being apponited as Knights. They had to dress with a white tunic.That's why in Spanish we use "Pasar la noche en blanco" (Spend the night in white) to express that we couldn't sleep during the nightime. Other similar expressions are: "Pasar la noche en vela" which means: to spend the night in vigil.