I don't understand. You're sleeping while you are dreaming. Dreaming can't keep you from getting enough sleep.

Having trouble falling asleep is another matter. It can normally be fixed with general sleep hygiene stuff.