You can get time data by Epics using the Pivot Table function. You just need to do such steps:
Open Open the Time in Status for Jira Cloud app.
Select Select a Pivot Table view.
Then click the Field button.
In the Field menu, you can customize data presentation by setting your custom fields for Rows, Columns, Report Filters.
To get the Epic time in the issue field, drag and drop such fields:
...