Your body relies on the secretion of melatonin, which is produced by the pineal gland in your brain- when your melatonin production is working well it sends a signal to your body to regulate your sleep cycle. Melatonin production is affected by cortisol (your stress hormone) that’s how stress can directly impact sleep.
Melatonin is also affected by light exposure - which you can use to your advantage. Getting 20-30 minutes of natural light exposure during the day can help to regulate this hormone. As melatonin is affected by light- you want to keep your room really dark. Even the small light that gets emitted from an air-con or alarm clock, or a sliver of outside light through a window can disrupt your melatonin production. Try covering any lights with some dark tape and ensuring you use good quality black-out curtains.