I think its important to first acknowledge how broad, and hence ambiguous, the term “meditation” can be. Despite what one may naively think of as meditation, the act itself comes in many different varieties. In some cases different meditation practices may even seem contradictory to one another. Regardless, many do share common features in their essence and guiding principles. For the sake of being in a fair position to comment, and in order for me to remain true to myself I will answer in the context of Vipassana mediation, or what may be referred to more generally as insight/mindfullness meditation.
Vipassana is a form of meditation with the objective of self-purification through self-observation. It seeks to eradicate self-inflicted suffering through a sort of reverse conditioning process of the mind in order to appropriately deal with the sources of personal suffering which are cravings and aversions. The main characteristic mind set for practicing the technique is to develop equanimity, which can be thought of as this ideal neutral state between one’s cravings and aversions. I won’t introduce the practice anymore than this (the interested reader can check out this tumblr blog for an idea, or better yet try it out for yourself).
It is worth mentioning that even though Vipassana is often practiced as a sustained silent sitting meditation, this serves merely as a controlled setting in which one is able to deepen the practice in order to apply and cultivate the technique in everyday life.
I think the question of how mathematics as a form of abstract thought is opposite to meditation is dependent largely on how the individual engages in mathematical thought, and not really dependent on mathematics in its purity. This should apply to most things we do and can think about. That is, any opposition to meditation that may exist is a consequence of the individuals subjective relationship with the thing or thought and not necessarily in the thing or object of thought itself.
It may seem kind of silly to regard mathematics as something that allows for cravings or aversions, but I think this is a prevalent phenomenon for both mathematicians and non-mathematicians dealing with mathematics. The latter notion of having aversions towards mathematics is obviously more common amongst those that do not like doing mathematics, but even I must admit at times to not wanting to calculate some integral using some kind of iterated integration-by-parts procedure with some trigonometric substitutions. A more general example could be something like test anxiety experienced by test takers and students. The issue of forming cravings is subtle and could be more complex, but most could at least attest that it feels good to solve a problem.
The act of performing mathematical thought, say, while practicing a sitting meditation where the meditator might not be trying to engage in mathematical thoughts could pose an obstacle. However this can apply for any arbitrary thought in a certain context. Suppose you are trying to count the number of combinatorial arrangements of something, or getting caught up trying to formally visualize Hopf vibrations of a 3-sphere and its stereographically projected counterpart in three dimensional Euclidean space. Now, imagine some time has passed and realizing you are trying not to think about either of those things while attempting to meditate.
A more interesting direction for this question might be to ask about the ways mathematics as a form of abstract thought does not oppose mediation. Or maybe even in the ways it might supplement that kind of thing.
In short, doing mathematics can be opposed to meditation practices, but it doesn’t have to be. Conversely, meditating or exercising whatever kind of awareness constitutes meditating does not have to oppose pure mathematical thought.