There's a few different potential issues here, so lets address them separately.
Firstly, the airport arrivals area. Australian airports have dedicated international arrival areas. These areas have zero facilities beyond bathrooms and maybe the occasional seat - and potentially a duty free store (MEL has one, but it may be closed at that time). They are not intended as areas for passengers to simply mill around - passengers are expected to either pass through immigration and enter the country, or pass through transit security and enter the international departure area (which requires a connecting flight/boarding pass). Someone simply hanging around in that area would be treated with suspicion, and it would not be surprising for security staff to notice and take interest in you (including the potential for them considering that you might be transporting drugs, etc)
Next, immigration. Although Melbourne airport is open 24 hours a day, immigration is not! The last international arrivals are around 11pm, and once those passengers have been processed the arrivals area will be cleared and immigration closed. It is likely this will not occur until after midnight, but there is no guarantee.
Then there's the arrival date. Australia's arrivals are automated, and many passengers do not even deal with a human on arrival, instead using automated gates which correlate with information taken from airline passenger details provided by the airline. I don't know exactly how this works in terms of date of entry, but I would not be surprised if your date of entry was set to the date of arrival (i.e., when the plane landed) even if you didn't enter immigration until after midnight. I don't have anything to back this up one way or another, but it's a risk...
Finally, there's the question of whether you would even be allowed to board the flight at all. If your visa requires a return ticket (some do, some don't), then the airline carrying you to Australia might realise that whilst you do have one, it is outside of the allowed timeframe based on when your flight arrives. This is probably unlikely, but at a minimum it's a risk. If no return ticket is required then this will not be a problem.