It depends a bit on how its messed up and why. I’m not an expert on sleep science, but I do have insomnia so I’ve read quite a lot about sleep – one thing that is recommended is to have a regular pattern of sleep, always going to bed at the same time, and getting up at the same time every day, even at the weekend. Also only using your bed for sleeping in (not watching TV or doing homework or looking at your phone), and not using devices like phones or computers for an hour before you go to bed can all help.
Hi, I am not a sleep scientist and think that Kate has given a really good thorough answer. My personal experience is to go to bed and get up at the same time everyday and using your bed only for sleeping really helps! Also avoid using screens 2 hours before bed, because the blue light produced by screen can trick your brain into thinking it is day time – so read a book or do something screen-less to unwind!