Thank you for detailing your situation. In general, Nigerian nationals are obliged to enter Germany with the appropriate visa for their reason to live here. In your case, that would be a visa for family reunification issued by the German Embassy in Abuja. You would then enter Germany and apply for a residence permit as a family member at your local immigration authority (Ausländerbehörde).
However, in certain specific cases it is possible to apply for the residence permit with the Ausländerbehörde even if you did not enter Germany with the correct visa. An example is if the person has young children. There have been court decisions that state it is not reasonable to expect a young child to be seperated from their parent while their parent has to leave the country to apply for a visa. The court does not sepcify a particular age of such young children (in German it refers to 'Kleinkind').
As I am not a lawyer, I advise you to speak with your lawyer before taking any further steps. One option would be to write an application to be issued with a residence permit by your local Ausländerbehörde. In the application you should provide the reason why it is not appropriate to expect you to leave and go through the visa process (i.e. because you have a young child) and refer to the relevant court decisions. I would point out that you share custody, care for the children and live together (if this is the case).
The Ausländerbehörde are obliged to examine your situation as to whether you can be expected to leave Germany. If they reject your application, you can appeal their decision. You can also lodge an emergency injunction with the administrative court (Verwaltungsgericht) if the authorities are taking a long time.
Here is a good overview of the situation (I used an online translation tool to put it in English so it may not read perfectly):
You also mentioned health issues. If you have difficulty accessing regular medical treatment, in Hamburg there is this organisation which provides treatment to people who are without health insruance:
I hope that helps, let me know if you have further questions.