There might be a better way to do this, but as an R user I would just read the statistic sub-brick into R and plot out the histogram:
source('~/abin/AFNIio.R')
myStat <- read.AFNI('ttest+tlrc[myTstat]')
myDF <- as.numeric(myStat$NI_head$BRICK_STATAUX$dat[4,]) # degrees of freedom for the t-stat sub-brick
myP <- pt(abs(myStat$brk[,,,1]), myDF, lower.tail = FALSE)*2 # 2-sided p-values
hist(myP)
For the histogram you may want to apply a mask so that you only focus on the voxels, for example, in the brain.
Gang