Statistical mediation allows researchers to investigate potential causal effects of experimental manipulations through intermediary mechanisms. Although mediation is well known in many branches of psychology, it is less commonly applied in cognitive psychology and neuroscience. One reason for the scarcity of mediational investigations in these branches may relate to difficulties in estimating mediation models for within-subject designs, which are common in these areas. Here, we draw attention to the importance and ubiquity of mediational hypotheses and mechanisms, and review the multilevel modeling approach for assessing mediation in within-subject studies. We then present a software package for implementing Bayesian multilevel mediation analyses in the R programming environment. We illustrate the within-subject multilevel mediation approach and use of the software package through an empirical example.