I took a run at trying that last year and didn't work for me. The major malfunction was the way the top of the bed rails taper down and how little the matting compresses. Yeah, ya can get a water tight seal for the interior but ya have a big ugly gap when looking from the outside. Water / road salt / general crud in the bottom edges of the roof recesses also likely.

Came up with this ridiculously simple (palm to forehead) fix: generic pick up truck topper seals. Only hang was that the widest I could find wasn't quite wide enough to really mount on the bottom of the roof like I wanted it. Some generic double sided foam taped helped.

http://www.extrudedsolutions.com/products.html

Super Cap Seal XL 23 FT (2 1/8" Width x 1/2" Height x 23' Length) - under $30, rated for caps up to 300 lbs. If ya find something about 3" wide......