What happens when you are sleeping?

During the night, your body undergoes temperature changes that can make it difficult to rest and this may be due to external factors.