I complained of hypersomnia, one dr says cut out junk carbs, caffeine, how can caffeine cause hypersomnia, I take that during day to combat fatigue?

But why...? The question is why do you need such measures to fight fatigue. Your doc is right to suggest limiting junk and caffeine but consider that they may be masking an underlying problem...Like sleep apnea or atypical depression or adhd or a thyroid condition. Best to get common causes of hypersomnia ruled out before embarking on a healthier journey.