Ya, I wouldn't make the tank out of legos lol, but if you are into having legos in your tank then go for it. No need to boil them, as boiling them might distort the legos to the point where they won't fit together.
If you are really paranoid you can soak them in a 20% bleach/water solution then rinse well.