Hi OP, I will try to help you out.
First thing you need to know is that "intention" controls your dreams. It is not your will, not your desire, not your wish, it is that pure
intention.
It is pretty hard for a beginner to generate some solid intention, both awake and asleep. However there are few methods that will make your
subconscious mind generate those intentions. One of the most powerful is fear. While you fear something, in the 'background' your subconscious mind
creates that pure intention.
You have experienced that type of scenario several times, where cords are cut, lights are off, getting darker. Next time you are dreaming slightest
reminder of those events will trigger those same intentions and they will grow really fast, the more you are scared, the more you get. This is a
simple explanation and there are few simple solutions for this.
Next time when you see a slightest hint of such scenario of what you described, just laugh at it. Don't think of mechanics here, just laugh honestly.
Remember this and think of it for some time, replay that scenario in your head couple of times. It might take few times before you remember to do this
in your dream, but as soon as you will laugh at that moment, things will change. For beginning it is enough, keep this as a habit to fight your future
nightmares. This is a noob tool, but it works great.
If you can't laugh at it, simple smile when it happens
However there is a very small chance that darkness is something different, but I highly doubt it. To understand it, I need to ask few questions.
Darkness happens when you are about to fall asleep or you are just falling or just felt asleep or it happens in the middle of the night(without wake
ups before your dream)?