The attack happened during morning prayers at the mosque in the Molai area on the outskirts of Maiduguri, the capital of Borno state.
The blasts happened minutes apart, the military said.
The military said 22 people were killed and 18 others were injured. However, two rescuers from the emergency management agency said 35 were injured. The two rescuers, who were involved in the evacuation of the mosque, spoke on condition of anonymity because they were not authorized to speak about the attack.
“The badly damaged bodies of two women in men’s clothing identified as the bombers were found in the mosque during rescue work,” one of the rescuers said.
The two women went to the mosque before morning prayers, and one joined the congregation inside, the two rescuers said, citing some of the survivors. The first bomber blew herself up as worshippers rose for prayers around 5:30 a.m., the rescuers said.
The second bomber then ran inside and, while near people who were trying to flee, detonated her explosives, the sources said.
No immediate claim of responsibility was publicly made.
However, Maiduguri has been beset for years by bloody attacks supported, planned and carried out by members of extremist Islamist group Boko Haram
It marked the second mosque attack in the Molai area in about five months. On October 15, 30 worshippers were killed and 32 others injured in a twin suicide attack on a mosque there.