Yes, and it sounds very natural.
If you said "He ate all the cookies that I cooked this morning" that, too, is correct and natural and means almost exactly the same thing.
I can't think of any example where one would be right and the other would be wrong. Either way, you made the cookies in the morning and there are none left now.
There is a subtle difference.
"He has eaten all the cookies" refers to an indefinite time, possibly spread out or extended. It is the language we would prefer if he were eating cookies, one by one, all day.
"He ate all the cookies I cooked this morning" is the language we would prefer if he ate all of them at once--perhaps at lunchtime.