Good advice here, and I'd especially listen to Indy who knows your terrain.
I don't think there's much momentum effect until you get over 10% on both the climbs and the descents... at least over 25 mph and maybe 30.
Learning your shift points and how to maintain cadence is a prerequisite to maintaining momentum. Focus on the former and the latter will come.
If you're finding yourself spun out at a relatively low speed and cadence, downhills are a great place to practice a nice circular pedal stroke. Back in the day we did downhill intervals for just that purpose. Let gravity propel you, stay in whatever gear you climbed in, and spin with just enough pressure on the pedals that you're not freewheeling, until you start to bounce. Since you don't have to put pressure on the pedals to propel yourself, you can concentrate on using the same amount of pressure all the way around.
But that's an intermediate-to-advanced drill... work first just on learning your shift points and shifting smoothly. On the steep stuff, you may find you want to shift several cogs at once, or you may want to go one gear at a time, pedal a few strokes and on to the next one. You may be lucky and find some of those ideal hills where you can just shift your chainring for climbing/descending, and stay in one of the middle freewheel cogs.
Speed comes from what you put behind you. - Judi Ketteler