What causes fatigue and irregular sleeping patterns and what can I do to fix it?  

Insomnia. There are numerous reasons and conditions that can lead to your problem. Best to call your doctor for an examination to determine the cause.
OSA, depression, PMD. There could be several reason that cause fatigue and irregular sleep patterns. One would really have to know more about you to have a real answer. Do you have a regular time to go to sleep every night. How many hours do you sleep? Do you have trouble falling asleep or staying asleep. Do you thrash around? Snore do you have a job that changes shifts? Napping? Are you feeling down in the dumps?