There are many simple ways to beat a Darkrai. One of them is simply giving a Pokemon that is good against Darkrai (i.e. a Fighting, Bug, Fairy, ect) a Lum Berry/Chesto Berry. This will make you wake up, and allow you to hit them with a Super Effective move of your choice. However, you probably won't be fighting a Darkrai every battle, so this may not be the best solution.
You can opt for a Pokemon with Vital Spirit, which cannot be put to sleep. However, most Pokemons with this ability tend to be somewhat weak, and probably couldn't take on Datkrai. The only exception I could think of is Primeape.
You can also opt for a Pokemon with Magic Coat, which negates the Darkrai's speed stat, since Magic Coat has increased priority over Dark Void, and will allow you to reflect the Dark Void and put his Darkrai to sleep. You can also try Pokemons like Breloom or Conkeldurr, who have a really strong Mach Punch, outspeeding Darkrai's Dark Void due to an increased priority move.
However, my favorite way to take care of Darkrai would be with a Sleep Talk Conkeldurr. Since Sleep Talk let's you hit the opponent while you are sleeping, it is the perfect move to catch a Darkrai off guard with, especially with a deadly fighting type. The moves would be somewhat like this:
Drain Punch
Mach Punch
Ice Punch / Knock Off
Sleep Talk
This would allow you to get a fighting move 2/3 of the time while asleep, and Mach Punch can help you finish off Darkrai in case you press Sleep Talk and wake up that turn.
There are many ways to beat him; these are just simple, yet efficient ways to do so.