Hebrews 3:9 is quoting Psalm 95:9. While there are many passages this resonates with, Deuteronomy 8 is one good example of the provision OP wonders about:
4 Your clothing did not wear out on you and your foot did not swell these forty years. ...
[And do not forget the LORD...] 15 who led you through the great and terrifying wilderness, with its fiery serpents and scorpions and thirsty ground where there was no water, who brought you water out of the flinty rock, 16 who fed you in the wilderness with manna that your fathers did not know, that he might humble you and test you, to do you good in the end.
Perhaps the question is, rather, a linguistic one: that is, does the "forty years" refer back to the "testing" by the "fathers", or to the "works" of the LORD?
The answer is essentially the same: the forty years referred is that in which both the "fathers tested" and the "LORD worked".
There is something a little interesting here though. If one compares the English versions on Hebrews 3:9, one immediately sees that there is a verse-division issue. The Hebrew of Psalm 95:9 does NOT include the "forty year" phrase, which goes rather with Ps 95:10:
10 Forty years I quarreled with a generation,
אַרְבָּעִים שָׁנָה אָקוּט בְּדוֹר
When it comes to the Hebrews citation, some versions opt to divide like the original Psalm, taking the "forty years" with what follows, rather than with the preceding.
In the end, the result is the same: the period of the wilderness wandering is in view whichever way you slice it.