My roommate was heating up some ramen in the microwave and I turned it off.
That was rude. Why would you turn it off on them?
I thought it would be funny when he went to check if it was done and it hadn't cooked at all.
I can see why you thought that would be funny. It's fine to play pranks on your friends and family as long as their harmless. Just try not to do things with the intent on aggravating them.
It's all in good fun. I doubt he will be mad, if anything I'm expecting a thank you.
As long as he understands it's all in good fun too. Just be careful not to take it too far.