I used to disregard the importance of proper sleep for years. For a long time I had incredibly inconsistent sleep - oversleeping during the day when lack of motivation, anxiety and low mood hit and pulling continuous all nighters trying to catch up with work right before assignments were due. And the long term effects were awful - difficulty concentrating and remembering things, and extremely low energy that made it difficult to function.
Since sleep has been so closely tied to my mental health struggles, I actually had to work on other things with my psychologist before it became better. This involved implementing daily relaxation techniques (mediation + yoga) instead of napping to avoid anxiety/negative feelings , taking small steps towards my goals, acknowledging small wins and planning activities that used to give me joy. This didn't happen overnight and I didn't do everything all at once, but my sleep has definitely improved... and it's made an incredible difference to my energy levels.
If I'm having a particularly bad time - the combination of sunlight in the morning + tiring myself out with some exercise during the day so that I'll fall asleep at night also helps!