I had a similar issue with my bike just a few weeks ago that actually persisted during the previous 2 months.
Shortly after getting the bike, I got ripped off when I had a shop in town that was supposed to pull, clean, install new gaskets and floats, reassemble and install my carbs. They did none of that, and got a good chunk of my money.
What happed over the next couple of months started in a similar fashion to what you descirbe.
About 15mins to 20mins after I started the bike and began riding it on the highway, the bike felt like it kinda lost a bit of power; I had to roll the throttle back a bit to maintain speed. Then several miles down the road it would die. If I cracked the gas cap open or waited a few minutes it would sputter to life, and off I'd go to work or home.
Three weeks ago, I was on the way home, I had that slight loss of power, then the bike died. This happened twice on I95 South, outside temps in to 90s. I filled up with gas when I got off the interstate, and 20mins later as I closed the throttle while I was coming to a stop, the bike backfired alot, and loud to boot, then sputtered out and died. After 20mins or so of sitting there, I got the bike to sputter to life. It backfired, and sputter up to 3000rpm, then seemed to smooth out, but lacked power. At idle is was a mess.
Long story short, I ended up pulling the carbs my-self and cleaning them. Here's what I found. The needles that we turn in all the way, and turn out 2 1/2 turns was filthy with crud. The coasting enrichment diaphragm on the rear carb was torn. At the inlet of each carb, in the mouth are three drilled holes. The hole on the left of each carb was partially clogged. Both the low speed and high speed jets were partially clogged/dirty. The large velocity diaphragm was improperly seated and leaking. The carbs had the original aluminum oxide encrusted, leaking gaskets in the bowels, as well as the gaskets in the same condition that are used in the low speed, high speed circuit. After replacing all the gaskets, and giving the carbs a complete cleaning, the bike runs like Kawasaki intended it to.
I gues what I'm saying is, it sounds like you may have a set of carbs that could be in need of some good cleaning. Sorry so long winded.
Hope this helps.