Likely you can if the controller has at least 50 volt capacitors inside. If the little cans inside are only marked with 30v, then they'll blow up on 36v.
But it's fairly likely they used a less expensive cap for a 24v controller, since 24v is rarely much more than 28v actual.