The Swede was eligible to join the Millers having cut ties with Bristol City ahead of Tuesday's transfer deadline.
"He will bring some experience, some calmness and strength to our side," interim Rotherham manager Paul Warne told reporters. "He is a Swedish lad, and I love Scandinavians. I think their attitude to sport is excellent.
"He hasn't played as much as he would have liked this year, but he has played a lot of games at Watford.
"I want to make the point that I haven't signed him because it is past the window, this is a deal that I wanted to conclude before the window but he was trying to sort out his departure from Bristol City."
Ekstrand could make his Millers debut against his former club when Rotherham visit Bristol City in the Championship this weekend.