(CNN) -- In class, Eric Ostendorf fidgeted in his seat and constantly kicked his knees up for exercise. He'd ask to go to the restroom, where he would do 45 chin-ups using the bar between the stall walls.

"Everything I did was with the thought in the back of my head, 'How can I burn the most calories?' " he said.

Instead of savoring food, Eric felt disgusted. He would flush his lunch down the toilet. It was as if a calorie counter had been embedded into his brain, forcing him to estimate how much exercise he needed to burn off every morsel.

Eric's anorexic habits began when he was 10.

And more children like him are developing eating disorders early, researchers warned this week in a report in the journal Pediatrics.

Between 1999 and 2006, the age group with the sharpest increase of hospitalizations from eating disorders was under 12 years old. The Agency for Healthcare Research and Quality reported a 119 percent rise.

The perception that eating disorders affect only females is wrong, especially for younger kids.

"The younger you get, the more likely they are to be boys," said Dr. David Rosen, the lead author for the eating disorders report in Pediatrics. "For the youngest patients, we see roughly equal number of boys and girls."

Anorexia patients can be as young as 7 or 8 years old.

"If you go back 20 years, a 10-year-old with an eating disorder would've been considered unheard of," Rosen said. "I see 10-year-olds with eating disorders all the time now."

95 pounds

Eric always had a competitive streak. As early as preschool, he compared himself with his friends. Who was faster? Who was better in soccer or basketball? At age 10, he wasn't athletic.

"I was a little chunky," Eric said. "I had baby fat and hadn't hit puberty."

Kids teased him.

Dr. Ted Weltzin, medical director of eating disorders services at Rogers Memorial Hospital in Oconomowoc, Wisconsin, has heard this from his young male patients.

"They've been teased, because they're seen as overweight or chubby," he said. "Those are kids that you'll see in the 9, 10, 11-year-old range, because that's when teasing occurs. They may not be as focused on a six-pack ab. They're clearly focused on not being the objects of ridicule."

There is also scientific evidence of growing dissatisfaction with body image in preschool children.

Researchers also say it's possible that some children are more genetically likely to develop disorders such as anorexia and bulimia. The disorder could also be tied to anxiety issues.

Eric's habits started innocuously a few months before his 11th birthday after casual glances at his dad's Muscle and Fitness magazine.

One day, he went to the basement where his dad kept the weight lifting equipment and did 200 sit-ups.

"I was really proud of myself," Eric said. "I decided, I'm going to do this every day. It started gradually."

Such moments are often the genesis of an eating order, Weltzin said. A certain subgroup of boys will take it to an extreme.

Boys who develop anorexia stop eating carbohydrates to build muscle mass. Dieting has become more socially acceptable for males since the Atkins diet, Weltzin said.

Eric cut out carbohydrates and ate only lean protein such as chicken breasts and egg whites. And he worried about the dangers of obesity.

Teenagers with eating disorders usually say they want to change their weight or appearance, but children have entirely different reasons.

"Younger kids are more likely to talk about health," said Rosen, professor of pediatrics at the University of Michigan. "They say, 'I want to eat healthier. I don't want to eat junk food.' "

As childhood obesity rates have soared, so have eating disorders. Rosen said young kids could be misinterpreting the obesity prevention message.

"I think kids are very inclined to see things through that black-and-white lens," he said.

79 pounds

When Eric's parents noticed his fixation on exercise and diet, they initially thought it was part of his obsessive-compulsive disorder. He had always been particular with his food, said his mother, Becky Ostendorf.

"He was very compulsive with exercise and of course losing weight," she said.

Eating disorders give kids a sense of control that's related to their anxiety, Weltzin said.

"There are rigid perfection obsessive-compulsive characteristics," he said. "They get locked into a behavior in a compulsive way."

Eating disorders have devastating effects on young, developing brains.

"It changes the way people think," Rosen said. "Whatever anxiety was there previously gets amplified a million percent. It's a vicious cycle, and kids spiral out of control."

Eric's workouts grew longer. At the peak of his eating disorder, Eric ran about seven or eight miles, lifted weights for an hour, played soccer for two hours and also worked on his abs every day. Merely minutes after a workout, he felt he had to do another one.

"My body was a machine," he said. "It was just exercising, not even take a break. I never felt tired because I never let my mind register that I was tired."

And it was killing him. His weight plummeted to 79 pounds.

When he was 15, he was hospitalized with a dangerously low heart rate, and Eric still couldn't stop exercising.

A family friend saw a solicitation for males with an eating disorder on "Dr. Phil" and suggested he appear on the show. He did, and afterward, Eric was connected with Rogers Memorial Hospital's eating disorders program.

He agreed to go to a residential treatment program, saying, "I'm not living life. I'm going through each day, working out. And it's hell."

145 pounds

After four months at the clinic in 2009, Eric said, he finally broke free from the anorexia.

"I was two weeks away from a heart attack at 15," he said.

It helped being in an environment surrounded by other male eating disorder patients. When he had an urge to exercise, he found a friend to distract him by merely talking or playing cards. He always had someone there who understood.

"This was my last chance to get help with this," he said. "At this point, I realized how much it affected my parents, myself, and I thought my parents can't afford this treatment if I screw around with this."

Although he worried about becoming obese if he didn't exercise, he said: "I just learned to stop and think. 'Right now, what can I do? We'll do that right now. That's all I have control over.' "

Now 17, he worries more about college than calories. He hopes to go to medical school so he can one day treat children who have eating disorders.

And he eats like a typical teenager -- stopping by Wendy's for an occasional burger combo meal after wrestling practice.

"I love food," the Kentucky teenager said. "I eat pretty much anything and everything."

For help, contact the National Association of Anorexia Nervosa and the National Eating Disorders Association.