All the answers did not work for me with Mui 5.X.
What actually worked to change the background color of the sticky header is the following
<Table stickyHeader sx={{'& th': {backgroundColor: 'blue'}}}>
and as theme override
MuiTable: {
styleOverrides: {
stickyHeader: {
'& th': {
backgroundColor: 'transparent',
},
},
},
},