United went in front on six minutes when Mark Hudson netted from the spot after Tom Cahill was brought down by Scott Griffiths.
Five minutes later, Dagenham had their best chance of the first half when Dave Rainford headed over from Glenn Southam’s free-kick.
But Rotherham had several good chances before Danny Harrison netted in the 41st minute.
Mark Joseph’s cross was headed clear by Dagenham but Harrison picked his spot with a delightful volley.
Only a brilliant save by Tony Roberts 25 seconds into the second period denied Cahill Rotherham’s third, but the half-time break revitalised the visitors and Ben Strevens scored on 53 minutes – bundling the ball into the net from Southam’s corner.