Having a healthy sleep routine, like going to bed at the same time every night, can help your brain form the habit of switching into sleep mode by releasing the hormone, melatonin, that helps us sleep.
That said, it can take time to figure out the most effective sleep schedule that works with your lifestyle, they key is to adjust your schedule over time, and stay consistent.