wrongful attractions

I know we're human, and some will say it's normal but has anyone else been in a relationship for a long time, and love the person you're with but you meet someone and they just give you a good feeling. 
Im a very bubbly, and my personality is flirty as it is, but a newly employed coworker at my job just has me at a loss for words.  I always joke with all my coworkers but we both catch each other flirting with the other and I feel so wrong like as if I'm cheating. He has a girlfriend too but he complains about her a lot and so he never hesitates to flirt, but I don't want to catch myself getting into a bad situation. 
I thought it was meaningless but one night he went out drinking and texted me twice during the night asking me if I was up and telling me to wake up at like 3:30am so obviously he's thought about me. I just don't get it. 
How do you deal with it it's driving me nuts... Is this just meaningless flirting or is it totally wrong.