I have spent the occasional night outdoors in nothing more than a sleeping bag with a groundsheet between the bag and the damp ground.
As long as you have something to break the wind and something keeping you off the ground, then you can get away with very little on a summers night.
Bugs can be more of a problem than you might expect, so aim to have some netting to cover yourself.
If the weather does break on you, it can get miserable quite quickly so you will still want to pack a waterproof jacket.
Condensation, bugs, dew, can settle on your bag overnight, so one soluition there is a bivvy bag, essentially a waterproof cover for your sleeping bag.
from one local site and another example
These can be had as army surplus too for example
In fact, the military services have been doing this kind of "spontaneous" camping forever so army disposal services are a great place to look for what's available. Downside is there's a lot of camouflage, which may even be illegal to use depending where you camp.
Other words that could be useful include Basha (basically a single fly), Bivvy or Bivi (as above), Zeltbahn (German), Hoochie,
The Zeltbahn / Shelter-half / Poncho could be a dual-duty solution too - essentially two of these: become a single cover, which could be dressed over your bike: As a weight saving it is your waterproof outer layer, and will be large enough to cover your framebags, bars, hands, handlebar-bag, and perhaps even seatpost pannier. So if there were a pair of your riding, this could be an excellent weight saving.
There even exist outdoor hammocks, which would provide shelter and comfort, though would not me!use the bike at all. examples of outdoor camping hammocks