During the day, geckos will usually hide in a warm place such as under their warm hide. This is to stay warm and also protect themselves from potential predators as they are prey animals in the wild. At twilight or nighttime, they will become active again and look for food. This is why it's important to keep your pet's terrarium, enclosure or cage away from windows and also to reduce the lighting inside of their habitat during the day.
Leopard geckos have adapted to be nocturnal by having their eyes capable of seeing well in low light conditions. This is due to their pupil's ability to expand and contract depending on the light conditions. This is a perfect example of how a reptile can adapt to its natural environment and how it can survive.
If you are looking for your pet gecko during the day, it is likely that they will be hiding somewhere in their enclosure or vivarium. They will only come out during twilight and at night for feeding, shedding and a bit of exercise. This is why it is a good idea to add many different hides, twigs, leaves, rocks and even plants to their habitat in order to make them feel more comfortable.
Another important thing to note is that if you see your gecko curled up in a dark spot, it is probably sleeping. This is a way of protecting them from their predators as they can't be easily spotted. The same can be said for if you see your gecko pressed up against the glass as this is their way of protecting themselves from heat and other things that may disturb them while they are trying to sleep.