Is it okay if I pray silently in my head while on my period?
You cannot pray while in your period. In Islam we mean pray as the set of actions we do, not just asking or talking to God like other religions do.
We pray standing, if we are not able, we do sitting, and not able, we do laying, cant even move you body parts, we do in our head. Praying refers to what Allah referred to praying. So you can't not even in you head. Allah told humans to pray, and Allah told women not to pray in menses. So if you pray in period it can only be considered as not following his command.
If you want to do good deed, you can praise Allah, you can recite Quran, read Hadiths. There are tons of things Prophet gave us for benefits, you do that.