How create a cube with a rippled surface
You can just extrude your sine surface second time, and then

scale it to 0 in extrude direction S,X(Y or Z), 0



In my gif I also recalculate normals at the end.