When you curl up you expose less surface area to the surrounding environment, preventing heat leaving your body through a process known as radiative heat loss.