A tiny bit of planning/prevention for next day can shut off the inverter or its circuit breaker from mains by midnight. If you must disconnect PV panels for whatever, do it at night time. I think...
Well, if following hourly pricing market, you can see the evening before if it will become a net loss or gain for that day.
So yes, you could turn it off and on at night. It would be fine to cut it off at AC or DC, nothing is happening at that time.
I would still prefer a solution which allows you to do it in daylight under power. It can serve more applications.