I have a 99 ultra Harley. It seems that when the engine gets up to temp the engine will die. I can let it sit and cool down for an hour and it will finally start. sometimes it may run for a few seconds or it may run for a few miles. I haven't found anything wrong in the wiring
Test or just replace the relays and see what happens (they're cheap anyway). Heat can cause them to malfunction but they'll work under cool conditions.
I had a car that did this exact thing. It turned out to be a bad fuel pump. It would sit and have enough fuel pressure when cold but it wasn't working at full capacity so the car would die and not start again until it cooled down. I'd check the fuel system.