However, in the mean time there are ways to help.
1. If you don't already have one, get a Primary Care Physician. Go for a wellness visit, get their practice to know you. Then if something like that happens at 1am, you can call the office, leave a message and get a callback from a nurse within 15-30m who can help you through your options and help with over-the-counter options to make it through the night until the office opens (or until urgent care opens). Or of course they can counsel you to go to the ED if they think there's a risk. But the point is, you can already weed out some unnecessary ED visits that way.
Note: not all providers have that service, so it's best to enquire when selecting a physician.
2. Many insurers have a nurses hotline but few people know about it. Check your policy. In the same way, they can help triage your situation, though it's less ideal since they don't know your medical record so they will tend to play it safer (ie. higher likelihood to send you to the ED). But it's better than nothing.
3. If the issue is pain management, you can also try your neighborhood 24/7 pharmacist. They can't diagnose you but again they might have tips to help you through the night until you can get proper care.