Is it okay to write, I ate tenty-nine apples. Or, I ate 29 apples.

Both are grammatically correct (assuming you mean twenty-nine). There are guidelines some people like to follow for when to use the digits and when to write it out, but you should be fine using whichever seems to work best.