Monorails run until the park is clear (typically 1-2 hours after park close). Each loop (Express, Resort, Epcot) run based on its park. When the Magic Kingdom is empty of guest, for example, expect the Express and Resort lines to shut down.
If you park at Epcot and go to the Magic Kingdom on a night where Epcot closes first, it is possible that the Epcot line will shut down before the Magic Kingdom closes -- in that event, you would take the monorail from the MK to the TTC, then catch the Disney/MGM bus and request an Epcot drop-off (the Monorail Pilot will mention this on the PA when you arrive at the TTC).
This past weekend, due to park hours and the marathon, we ran the monorails 24 hours a day. If there's a need, they'll be running!
And parking at a resort to avoid traffic is frowned upon...