The darkest skies in areas not highly impacted by man-made light pollution are when the moon is not above the horizon at all and the sun is at least 18° below the horizon. This happens more often that people think. Over the course of a year, the moon is only visible in the night sky about half the time, just as it is visible about half the time during the day.
The moon does not always appear in the night sky. The only time it does appear in the sky all night long is near the full moon, when it rises at about sunset and sets around sunrise. At other times in the lunar cycle the moon may rise during the day and set before the night is over, or it may rise after night has begun and set during the day. A new moon rises about the same time as the sun rises in the morning and sets about the same time the sun sets in the evening.
When the moon is new, it is very close to the sun in the sky. Under such a circumstance, the glow in the sky from the sun will be far brighter than that from the moon. Even after sunset, the sky remains brightened by the glow of the sun still shining on the upper atmosphere above ground locations that are shaded.
How long this glow remains is a function of ones latitude between the equator and the poles and the procession of the four seasons, both of which affect the angle of the sun's path in the sky and how far below the horizon the sun reaches overnight.
During summer at locations close to the poles, the sun's path is closer to horizontal than vertical as it rises, crosses the sky, and sets. In such locations on nights when the sun never falls more than 18° below the horizon overnight, the sky never gets dark enough to end astronomical twilight. Evening dusk leads directly to morning twilight. Inside the Arctic and Antarctic circles, the sun is never more than 22° below (or above) the horizon and stays above the horizon for half the year and its path is very close to horizontal as it moves across the sky.
At locations closer to the equator, darkness falls much more rapidly after sunset and lasts much closer to sunrise because the sun rises and sets at a near vertical angle and is nearly 180° below the horizon at midnight.
Localized data for your location (based on your SE profile).
Silicon Valley lies between 37° and 38° North. At that latitude in late September the sun's path is at an angle of about 63° to the horizon when it sets. Thus astronomical twilight lasts for roughly 87 minutes following sunset and begins the next morning roughly 87 minutes before sunrise.
All times below are local for the center of San Jose, CA which probably has way too much light pollution for your purpose. For each degree longitude moving east from San Jose, all times will be 4 minutes earlier. For each degree longitude moving west of San Jose, all times will be four minutes later.
On September 27, the almost new moon sets at 6:48 p.m. PDT and the sun sets at 6:57 p.m. PDT. Astronomical twilight ends at 8:24 p.m. PDT. Astronomical twilight begins at 5:33 a.m. PDT on September 28. The moon rises at 6:45 a.m. PDT and the sun rises at 7:00 A.m. PDT.
- For a little over nine hours between 8:24 p.m. PDT on September 27 and 5:33 a.m. PDT on September 28 neither the sun nor the moon will illuminate the sky and it will be as dark as it gets in terms of non-terrestrial sources of light.
On September 29, the sun will set at 6:55 p.m. PDT and the moon follows the sun below the horizon at 7:58 p.m. PDT. Astronomical twilight ends at 8:22 p.m. PDT when the sun reaches 18° below the western horizon and begins the next morning when it reaches 18° below the eastern horizon at 5:35 a.m. PDT.
- For the nine-plus hours from 8:22 p.m. PDT on September 29 until 5:35 a.m. on September 30 neither the sun nor the moon will illuminate the sky.
You could have just as easily done this a week earlier on September 21 between the hours of 8:33 p.m. PDT when astronomical twilight following sunset ended and 11:57 p.m. PDT when the last quarter moon rose in the east. The only difference is that you only got a bit less than three hours of maximum darkness in the evening hours.
Or you can do it a week after the new moon in the early morning hours of October 6 when the moon will set at 12:19 a.m. PDT and astronomical twilight will begin before sunrise at 5:41 a.m. PDT. That gives you about five and one-half hours of maximum darkness in the early morning hours.
The window of opportunity for the darkest possible sky is greatest each month at a new moon, when the entire time between the end of astronomical twilight after sunset and the beginning of astronomical twilight the following morning has neither the moon in the sky nor the sun within 18° below the horizon.
As each month progresses, the moon rises and sets later and later each day. The window of opportunity is then narrowed by the amount of time the moon is still above the horizon after the end of astronomical twilight following sunset.
Eventually the moon does not set until the beginning of astronomical twilight the next the morning, at which time there are about four days, give or take (at mid-northern or mid-southern latitudes, depending on the seasons) when the moon is always in the sky between the end of astronomical twilight in the evening and the beginning of astronomical twilight the following morning. The full moon occurs in the middle of this period.
The window of opportunity reappears a few days after the full moon when the moon starts rising after the end of astronomical twilight following sunset. From the end of astronomical twilight following sunset until the moon rises you will have a maximally dark sky. The window gets progressively larger each night as the moon rises later and later until the next new moon when the darkest sky is once again at the longest for that lunar cycle which begins all over again.