How do you bicycle the most efficiently on a road bicycle? I assume this has been studied to no end for e.g. UCI governed bicycle racing, and probably by others as well.

Simply:

How do you ride the most efficiently, in the context of putting down power?

I'm ignoring aerodynamics and bicycle attributes here entirely. Assume a generic road bicycle on any road course. Before anyone screams that it depends on the road you're bicycling, let me just state that I'm looking for a generic answer that can be applied to any stretch of road. A set of simple guidelines, or "rule of thumb" for how to bicycle the most efficiently.

How do you distribute your power budget? Should the rider put down extra power when going uphill? On the level surface? When going downhill? I think I've seen riders often rest when going downhill, is this due to such a rule of thumb -- that this is considered to be optimal, or is it due to personal preference?

Surely there must be a sweet spot in the graph for any inclination -- where efficiency is given as a function of a few parameters, the inclination, the power put down, and the wind resistance? Something like that?

If this is indeed subjective, and cannot be answered on a general basis, then I accept that as an answer. The simple fact that there is no guidelines to be given and nothing to be said on the matter would at least give me some peace of mind.

Whenever I bicycle, I'm always questioning myself, if I'm doing it wrong in terms of how I put down power. If someone could point me to a study that explains how and when to put down power that would be great, or a study that explains why such a thing is impossible.
The first answer is: you bike most efficiently inside a peloton (where air resistance is lowest)
The second answer (in a GCN video of a sprinter): you do a lot or close to no effort in order to stay at a certain speed (stay on the average). Any increase of speed means you lose a lot more to aerodynamic effect. This usually means you give everything on uphills and recover on downhills (assuming sprint-type uphills and downhills, i.e. 5% or so).

The general idea is that the average speed is much more affected by slow segments than by fast segments, so you want to increase as much as possible the speed on the slow segments, even with a significant decrease on the fast segments (if you drive 99km at 99 km/h and 1km at 1 km/h, the average speed over those 100km is about 50 km/h - one percent of the length at a very low speed just about halves the average on the rest)