How to ‘fill the gap’ between the end of one’s grant and handing in one’s thesis
This is very normal to happen, you have three choices, which I would recommend the last two: 


Extend and Hope The Supervisor Comes Through: Obviously you are extending your stay at the university, you can stay still and hope that your supervisor can find a funding somewhere, which is laying around, and then give it to you. 
Find a Job and Write Your Thesis: Second choice is to go and find a job (postdoc or industry), since you are a German national, the world is your oyster. You do not need to waste time and energy for visa applications. 

2.1 Benefit: You stack your experience, start earning based on years of education.

2.2. Drawback: You need to balance it out between your future job and writing your thesis. 


A Big Fat Alert: The second option is the tricky one, not everyone can balance it out between a job and writing a thesis; and I know people who did fail their submission because they were too busy earning their living.


Combination of the first two: You can find a job at your university and then write the thesis at the same time. 

Main Benefit: You can still discuss issues with your supervisor and be at the same environment until your submission. 


Conclusion: You need to sit down and think about this very carefully, and then choose your option. Not the best scenario but it happens to many at the end of their third year period.