I ran a study with three classes of fourth graders. Are there any rules or guidelines about when to use “4th graders” and when to use “fourth graders” in APA Style? 

Yes, there are guidelines! First, second, third, fourth, and the like are called ordinal numbers. They indicate position in a series. One, two, three, four, and the like are called cardinal numbers. They indicate an amount—how many of something you have.

The guidance in the Publication Manual is to treat ordinal numbers as you would cardinal numbers. The rule is to write out numbers one through nine and use digits for numbers 10 and up (with some exceptions).

Here are some examples: 

In other words, the answer to your question is to refer to your study participants as “fourth graders.”

And now you also know that regardless of whether you could answer the questions on the American game show Are You Smarter Than a 5th Grader?, the title should say “Fifth Grader”—in APA Style, anyway.