If you would draw a card while your library has no cards in it, you win the game instead.
If for some reason you can’t win the game (because your opponent has cast Angel’s Grace this turn, for example), you won’t lose for having tried to draw a card from a library with no cards in it. The draw was still replaced.
If two or more players each control a Laboratory Maniac and each player is instructed to draw a number of cards, first the player whose turn it is draws that many cards. If this causes that player to win the game instead, the game is immediately over. If the game isn’t over yet, repeat this process for each other player in turn order.