What could be the cause of frequent lack of energy?

Lack of energy. There are many possible causes for low energy including depression, hypothyroidism, hyperthyroidism, anemia of various causes including nutritional deficiency, low testosterone levels, heart or lung diseases, sleep apnea, medication side effects, infectious diseases (hiv, hepatitis, etc), or even cancer. So please go see a doctor to help you sort things out.
Several diseases. Such as heart failure, diabetes etc. Some situation that related to unefficient sleep, for example sleep apnea also leads to lack of energy.
Many things. You can have sleep problems from snoring, apnea, restless legs, poor sleep hygeine, anxiety/depression, napping during the day, night seizures, noises in the neighborhood waking you up, bed bugs, waking up to use the bathroom, acid reflux, allergies, or any number of things. I recommend seeing a doctor to get checked out.