The two, who said they worked for German humanitarian organisation Sea-Eye, were arrested on Friday, navy spokesman Colonel Ayoub Qassem told AFP in Tripoli.
“They were arrested after their boat entered Libyan territorial waters. They tried to flee but stopped after warning shots were fired,” Qassem said.
He added that they acknowledged falling asleep before realising they were no longer in international waters.
Qassem said the pair were to have been transferred on Sunday to a European boat off Libya but that the operation was delayed because of bad weather.
Sea-Eye declined to comment to AFP.
Libya with its 1,770 kilometres (1,100 miles) of coastline has become a hub of illegal immigration towards Europe in the absence of proper border controls in a country plunged into chaos.
Migrants head in rickety makeshift boats for the Italian island of Lampedusa some 300 kilometres off the coast.
Italy's coastguard said around 1,100 migrants were rescued off Libya on Sunday, bringing the tally over the weekend to 3,400.
These latest arrivals come on the heels of a major migrant wave at the end of August, when more than 14,000 people were plucked to safety in the space of five days. Most were from sub-Saharan Africa.