You may be better off by using the drain valve on the tank to rinse out the sand periodically than relying on a filter. Precipitated minerals can look like sand, and the filter may not do much except create a new maintenance issue and restrict the flow when clogged.
Are you sure you have the hot and cold supply pipes hooked up to the right place? Getting them backwards will shorten the time you can get hot water significantly because of the dip tube. If backwards, instead of drawing water off the top (hottest) portion of the tank, you'd be drawing it from nearer the bottom, where the coldest water is.
A common reason for cool water is from a single handle valve that has a cross-over. This can happen on some valves when the cartridge fails. Whenever you do maintenance on the water supply system components, when you turn the water back on, it can release some debris and clog things up.