The place where quail sleep depends on where they live in the wild. Some, like Montezuma quails that live in the southern US, gather in groups and sleep on the ground in close outward facing circles. Others, like Scaled quails that live in desert grasslands, sleep higher off the ground in trees or thick brush to hide from predators.
If a quail is huddled up in the corner of its cage this is likely because it is sick or cold and should be taken to a veterinarian. You can also try to warm it up by covering it with a towel and gently petting it.
Quail lay throughout the year if conditions are right, although they are most active during spring to autumn. During this time they nest in tall grass, sticks, shrubs and in the ground which is often lined with soft material like weeds, leaves and feathers. Generally quail will nest within a 40 acre radius of where they were born. They are able to move quickly away from their homes in the event of a threat, which they detect by the movement of other animals and by light reflecting on the surrounding vegetation.
You can help your quail to get a good night’s sleep by ensuring that the room they are housed in is dark at night. It is also important to keep the quail away from cats, dogs and other meat eating birds as they are a serious threat to them.