A persistent lack of sleep can cause your body to shut-off non-essential processes e.g. hormone regulation. My testosterone (I'm a guy) was abnormally low (<5th percentile) and it was largely due to lack of sleep, poor eating and 0 exercise. Also I took a testosterone cream supplement for a couple months and literally within weeks of this + gym + healthy food, I put on 10% my weight of muscle and magically had twice the energy I had before. I literally feel like life was a dream before changing my daily routines to keep my testosterone up (cold shower, heavy weights 4x per week, eat protein rich big meals with veg, etc. ) and keep myself sane (20min mindfulness meditation first thing in the morning). That's the other thing: your body functions best while the sun was up (we have had electricity for ~0.001% of man's complete lifetime so our bodies didn't evolve to function at night and we've only had lights for like 100 years. Before that you made a fire and had to chill in one spot!
TLDR: no sleep + poor diet = messed up hormones = low energy ... get your blood tested at your GP!