All toddlers go through regular sleep cycles in which they wake just slightly and then settle into deep sleep again. You need to ensure that discomfort doesn’t wake your child during those periods of slight waking.
Darkness matters, blackout curtains can be necessary, especially in the summer when your toddler will be going to sleep while it’s still light out.
Also, warmth matters too if your toddler kicks his covers off, make sure he sleeps in warm PJs with feet.