Although it's not made quite so obvious in the film, in the original script Laurio entered the scanning chamber (and then the cell) with a huge stupid smile on his face and a swagger in his step. Everyone around him puts 1+1 together and immediately spots that he got lucky last night.
Since he's got massive amounts of colloidal iron in his bloodstream, Eric then discerns what actually happened to Mr Laurio the night before; A woman slept with him and then (unknowingly) injected him with metal. It's not hard to work out who that woman might be.
In the film, they changed the sequence of events slightly, having Magneto be asleep until Laurio entered the chamber then have him wake up by detecting the metal. Although they'd changed the sequence of events, they obviously still kept the line about not trusting a beautiful woman because, heck, it's a good line as well as being generally good advice.
From the film's script
INT. PLASTIC PRISON - SECURITY CHECKPOINT - DAY TWO GUARDS stand in
the room by the door to the catwalk. LAURIO enters carrying a tray of
GUARD 1: What's that on your face, Mitch?
The Guard grimaces at the thought of it, and opens the door.
GUARD 1: You're clear.
INT. PLASTIC PRISON - SAME TIME
Magneto angrily paces back and forth -- thinking about Charles. He
stops and looks at Laurio... curiously.
LAURIO (O.S.): Have a nice sleep, Lensherr?
Laurio enters and puts the food on a table. His smile becomes a
scowl when he sees Magneto staring at him.
MAGNETO: There's something different about you,
In the film's novelisation, they chose a middle ground, having Magneto spot the smile on Laurio's face as he came awake:
Mitchell Laurio was whistling as he came on shift. He couldn’t
remember many of the details of what had happened in the ladies’ can,
but he’d never felt better in his life than he had after it was done. Just the
memory of Grace’s farewell kisses was enough to stir his blood and put
a spring in his step, and the fact that she’d left a whispered promise
to meet him again tonight made him wish as he never had before for the
day to end.
The guard at the final checkpoint was the latest to offer comment:
“Mitchell Laurio, what is that on your face, man?
Eric Lehnsherr was asleep until Laurio stepped over the threshold.
Then, just like that, he came completely awake with a rush he hadn’t
felt since his capture.
“Sweet dreams, Lehnsherr?” asked Laurio, his mockery plain. Just
because he’d had the best night of his life didn’t mean he was going
to pass on the morning beating. The one gave him just as much pleasure
as the other.
Laurio set the tray on the table. Lehnsherr hadn’t moved, beyond
sitting up on the bed. There was something different about his
expression, though, like there was a big joke being played here that
only he was privy to. But at the same time, there was a predatory cast
to his eyes that made Laurio suddenly wish the internal monitors were
active and that he were somewhere else.
As was usual for him when he felt ill at ease or threatened, Laurio
got aggressive. This time, he decided, he wasn’t going to stop until
the old man begged him.
“There’s something different about you, Mr. Laurio,” Lehnsherr said
with a slight question to his voice, as if he couldn’t quite credit
what he saw.