I think I'd start by looking for a low charge on the battery. If you have an AGM type battery (Odyssey PC680, Westco, etc) sealed battery (Not a Lithium type), and the stock voltage regulator, the AGM is only getting 80% charged. If your plug-in maintenance charger is not AGM rated, same thing. AGM's need 14.5-7 volts to fully charge and the OEM voltage regulator does not go that high. When a battery sits with less than 100% charge the plates sulfate and the battery begins to fail. The BMW Motronic ECU really likes a 100% charged battery, too. Might be where you are. It happened to me, that's when I found out about AGM's, voltage regulators, chargers, etc. Bikes this age were designed for the old flooded plate battery (where you check the water in the battery and add when necessary) with a 13.5 volt regulator. AGM = Absorptive Glass Matt (between the lead plates).
Another symptom you have that says this might be a low battery is that it ran ok after sitting for a while. A low battery will slowly revive itself somewhat if left alone for a while, which it sounds like what you experienced.
IF you do have an AGM battery, get a charger like a BatteryMINDer model 2012-AGM (Amazon - $89). These have a desulfation cycle that will recondition sulfated cells. I didn't believe it until it fully revived my dead PC680 which is still going strong.
You can replace the voltage regulator in the Bosch alternator with an AGM rated regulator from EME for $39 : Voltage Regulators and Rectifiers (diode board) for a properly functioning charging system
Fuel - water in the fuel, fuel filter full, injectors plugged up, bad fuel pump. Put a dose of Techron concentrate in the tank. I do this every so often and it helps keep things clean. If that improves the situation, then keep looking at these fuel issues.