The popstar filmed a cameo last week for the upcoming episode based on her music.
"She was so great," Murphy told E! Online. "She was so sweet and so humble. I think she was really impressed about, you know, so many kids on the show do what they do because they grew up at 7 or 8 wanting to be Britney Spears. So she's really sweet with them."
He continued: "We had a number with a bunch of 8-year-old dancers in the show and she spent a lot of time talking to them and they did a number for her and she was so sweet. She's great with kids, she was awesome."
However, Murphy admitted that the security surrounding Spears had caused some problems when she arrived on set.
"It was literally like the president came," he joked. "We all had to wear wristbands. I couldn't get into my own set at one point which I thought was hilarious. Literally, it was like [security was asking me], 'Who are you?' But, you know, we just wanted to protect her and make it great."
Glee returns for a second season on September 21 on Fox.
> Spears "really cool" on 'Glee' set