A Nigerian governor planned to shut all IDP camps in his state by June, but 1.4 million people remain displaced by the Islamist insurgency.
Nigeria secured the release with mediation by the International Committee of the Red Cross. A military source said three Boko Haram commanders had been freed in an exchange, but declined to give further details.
The girls are studying at the American University of Nigeria in Yola.
At least four villagers were killed in the attack Tuesday.
Girl says all but six of the Chibok girls are alive and being held in the Sambisa Forest, which contradicts the assumption the girls had been widely scattered.
The abduction was larger than that of the Chibok girls but received little attention.
Boko Haram militants were reported to have kidnapped more than 400 women and children from the northern Nigerian town of Damasak that was freed this month by troops from Niger and Chad.
Boko Haram militants took control of Mubi in Adamawa State on Oct. 28, killing dozens of people. Now, it's been retaken.