The right one when using the algorithm package is \ALG@name and not \algorithmcfname.
So you have to define your new environment as
\makeatletter
\newenvironment{megaalgorithm}[1][htb]{%
\renewcommand{\ALG@name}{MegaAlgorithm}% Update algorithm name
\begin{algorithm}[#1]%
}{\end{algorithm}}
\makeatother
MWE
\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\makeatletter
\newenvironment{megaalgorithm}[1][htb]{%
\renewcommand{\ALG@name}{MegaAlgorithm}% Update algorithm name
\begin{algorithm}[#1]%
}{\end{algorithm}}
\makeatother
\begin{document}
\begin{megaalgorithm}
\begin{algorithmic}
\State Hello
\end{algorithmic}
\caption{A mega algorithm}
\end{megaalgorithm}
\end{document}

In algorithm.sty (part of the algorithms bundle) you can find:
\newcommand{\ALG@name}{Algorithm}
and
\floatname{algorithm}{\ALG@name}
So, another option is to define your new environment as
\newenvironment{megaalgorithm}[1][htb]{%
\floatname{algorithm}{MegaAlgorithm}% Update algorithm name
\begin{algorithm}[#1]%
}{\end{algorithm}}
The first method is taken directly from the style file, while the latter can be found in subsection 4.4, "Customization", of the algorithms documentation
\makeatletter\renewcommand{\ALG@name}{MEGAAlgorithm}\makeatother– Johannes_B Feb 27 '15 at 18:49