The incident, between J36 Bridgend and J37 Pyle, happened on Tuesday just before 15:00 GMT.
Highways officials say the repairs are being carried out but they will not be finished before Wednesday morning.
One lane of the M4 at Bridgend remains closed in both directions for repairs after a lorry travelling west went through the central reservation and ended up on the hard shoulder of the eastbound carriageway.