The process you're describing in the question is the one at the origin of coal. Although coal deposits are known from the Devonian to the Quaternary, they have been 3 major periods of depositions (seeThomas 2013): the Carboniferous-Early Permian, the Jurassic-Cretaceous and during the Cenozoic. So, indeed the Carboniferous is one of the main period of coal deposit but I couldn't find any numerical evidence in the literature that this is the "main" period of deposit. The idea that it is is most likely due to the fact that the western Europe and eastern USA coal mines (hence historically the most noteworthy) all happen to be Carboniferous.
But as far as oil (petroleum) is concerned, according toKlemme & Ulmishek 1991(straight from the abstract):
Six stratigraphic intervals, representing one-third of Phanerozoic time, contain petroleum source rocks that have provided more than 90% of the world's discovered original reserves of oil and gas (in barrels of oil equivalent). The six intervals are (1) Silurian (generated 9% of the world's reserves), (2) Upper Devonian-Tournaisian (8% of reserves), (3) Pennsylvanian-Lower Permian (8% of reserves), (4) Upper Jurassic (25% of reserves), (5) middle Cretaceous (29% of reserves), and (6) Oligocene-Miocene (12.5% of reserves)
SeeKlemme 1994for a detailed explanation on the origins of the Jurassic source rocks (i. e. 25% of the world's reserve at the time): most of them are marine, but some are fluvial or from lagoonal inland seas (table 3.2).
References:
Klemme, 1994. Petroleum systems of the world involving Upper Jurassic source rocks. In Maggon & Dow (Eds),The petroleum system - from source to trap中部的回忆录,60:51 - 72。
Klemme & Ulmishek, 1991. Effective petroleum source rocks of the world; stratigraphic distribution and controlling depositional factorsAAPG Bulletin, 75: 1809-1851.
Thomas, 2013.Coal Geology, 2nd Edition.Wiley-Blackwell, 444pp.